Project

General

Profile

« Previous | Next » 

Revision 7407

simplify the xml_access query, and instead use guid to check for permission. Now the docid/rev join (to get most recent version for search results) happens "higher up" in the query.
http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5696

View differences:

QuerySpecificationTest.java
55 55
    /** The utilities object for accessing property values */
56 56
    
57 57
    private static String selectionQuery = 
58
    	"SELECT docid,docname,doctype,date_created, date_updated, rev " +
59
    	"FROM xml_documents WHERE docid IN (((((SELECT DISTINCT docid FROM xml_nodes " +
58
    	"SELECT xml_documents.docid, docname, doctype, date_created, date_updated, xml_documents.rev " +
59
    	"FROM xml_documents, identifier " +
60
    	"WHERE xml_documents.docid = identifier.docid AND xml_documents.rev = identifier.rev " +
61
    	"AND xml_documents.docid IN (((((SELECT DISTINCT docid " +
62
    	"FROM xml_nodes " +
60 63
    	"WHERE UPPER(nodedata) LIKE %JONES% ) )))) ";
61 64
    /*private static String extendedQuery = "select xml_nodes.docid, 'dataset/title' as path, xml_nodes.nodedata, xml_nodes.parentnodeid from xml_nodes, xml_documents where parentnodeid IN (SELECT nodeid FROM xml_nodes WHERE nodename LIKE 'title' AND parentnodeid IN (SELECT nodeid FROM xml_nodes WHERE nodename LIKE 'dataset' ) )  AND xml_nodes.docid in " +
62 65
    		"('obfs.45337', 'obfs.45338', 'obfs.45346') AND xml_nodes.nodetype = 'TEXT' AND " +

Also available in: Unified diff