Hi, I am not sure I am right so take this as a suggestion:
You have indexed INVOICE/BILL_INVOICE:bill_ref_no, but strictly speaking, your query is looking for INVOICE nodes having a child node called BILL_INVOICE:bill_ref_no. I doubt that your index should be used, I would expect a scan of INVOICE nodes. If you looked for nodes under BILL_INVOICE:bill_ref_no, your index would be used, e.g. /INVOICE[BILL_INVOICE:bill_ref_no="2"] which would definitely use the index. This is just from a general "feeling" of the issue, please correct me if I am wrong. Anders ----- Original Message ----- From: "Sreeni Chippada" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Monday, March 04, 2002 9:13 PM Subject: indexing/xpath query question > Hi, > I am new to xindice. I added a few documents as DOMs and ran xpath > query successfully. Then I added an index on the collection and ran the > query. It takes same amount of time. > > Here are the details: > > My document structure looks like this: > > <INVOICE> > <BILL_INVOICE.bill_ref_no>2</BILL_INVOICE.bill_ref_no) > . > . > . > </INVOICE> > > I loaded about 2000 documents. > > When I run 'xindiceadmin xpath -c /db/test -q > /INOVICE/BILL_INVOICE.bill_ref_no' I get all the > /INOVICE/BILL_INVOICE.bill_ref_no elements. > > Then ran the following command to add an index. > > xindiceadmin ai -c /db/test -n BillRefNum -p > /INOVICE/BILL_INVOICE.bill_ref_no > > Now if run the same query as above, it still takes same time. Looks like it > not using the index i created. > > Appreciate any help. > > Thanks, > Sreeni
