Project

General

Profile

« Previous | Next » 

Revision 2376

Added by sgarg about 19 years ago

Modifying code so that nodedata is stored in xml_index table next to the paths.
This helps in making the search faster.

View differences:

QuerySpecification.java
908 908
            Hashtable unaccessableNodePair)
909 909
    {
910 910
        StringBuffer self = new StringBuffer();
911
        self.append("select xml_nodes.docid, xml_index.path, xml_nodes.nodedata, ");
912
        self.append("xml_nodes.parentnodeid ");
913
        self.append("from xml_index, xml_nodes where xml_index.nodeid=");
914
        self.append("xml_nodes.parentnodeid and (xml_index.path like '");
911
        self.append("select path, docid, nodedata, ");
912
        self.append("nodeid ");
913
        self.append("from xml_index where (path like '");
915 914
        boolean firstfield = true;
916 915
        //put the returnfields into the query
917 916
        //the for loop allows for multiple fields
......
921 920
                self.append((String) returnFieldList.elementAt(i));
922 921
                self.append("' ");
923 922
            } else {
924
                self.append("or xml_index.path like '");
923
                self.append("or path like '");
925 924
                self.append((String) returnFieldList.elementAt(i));
926 925
                self.append("' ");
927 926
            }
928 927
        }
929
        self.append(") AND xml_nodes.docid in (");
928
        self.append(") AND docid in (");
930 929
        self.append(doclist);
931
        self.append(") AND xml_nodes.nodetype = 'TEXT'");
930
        self.append(")");
931
        //self.append(") AND xml_nodes.nodetype = 'TEXT'");
932 932

  
933 933
        addAccessRestrictionSQL(unaccessableNodePair, self);
934 934

  

Also available in: Unified diff