Revision 2434
Added by sgarg about 19 years ago
QuerySpecification.java | ||
---|---|---|
909 | 909 |
Hashtable unaccessableNodePair) |
910 | 910 |
{ |
911 | 911 |
StringBuffer self = new StringBuffer(); |
912 |
self.append("select docid, path, nodedata, "); |
|
913 |
self.append("nodeid "); |
|
914 |
self.append("from xml_index where (path like '"); |
|
912 |
self.append("select xml_nodes.docid, xml_index.path, xml_nodes.nodedata, "); |
|
913 |
self.append("xml_nodes.parentnodeid "); |
|
914 |
self.append("from xml_index, xml_nodes where xml_index.nodeid="); |
|
915 |
self.append("xml_nodes.parentnodeid and (xml_index.path like '"); |
|
916 |
|
|
915 | 917 |
boolean firstfield = true; |
916 | 918 |
//put the returnfields into the query |
917 | 919 |
//the for loop allows for multiple fields |
... | ... | |
921 | 923 |
self.append((String) returnFieldList.elementAt(i)); |
922 | 924 |
self.append("' "); |
923 | 925 |
} else { |
924 |
self.append("or path like '"); |
|
926 |
self.append("or xml_index.path like '");
|
|
925 | 927 |
self.append((String) returnFieldList.elementAt(i)); |
926 | 928 |
self.append("' "); |
927 | 929 |
} |
928 | 930 |
} |
929 |
self.append(") AND docid in ("); |
|
931 |
self.append(") AND xml_nodes.docid in (");
|
|
930 | 932 |
self.append(doclist); |
931 |
self.append(")"); |
|
932 |
//self.append(") AND xml_nodes.nodetype = 'TEXT'"); |
|
933 |
self.append(") AND xml_nodes.nodetype = 'TEXT'"); |
|
933 | 934 |
|
934 | 935 |
addAccessRestrictionSQL(unaccessableNodePair, self); |
935 | 936 |
|
Also available in: Unified diff
Modified code such that nodedata column in xml_index is not created and used. So now we are using the same logic for using xml_index which was used for metacat release 1.4