Hi,
I'm new to xindice and am having a problem with an XPath query. It is probably
something stupid, but I haven't been able to find it.
As a test I created a collection called commands and added the commands.xml
file that ships with xindice to it 1000 times. Each iteration I modified the
element <command switch="ac" so that it would be <command switch="ac1" <command
switch="ac2" etc. I then put 1000 copies of the doc in the collection. I can
retrieve a document using its id and everything looks fine. The switch
attribute is properly modified.
The problem is when I run an XPath query like this:
col = DatabaseManager.getCollection(DB_URL + "commands");
String xpath = "//command[switch='ac1']";
XPathQueryService service =
(XPathQueryService)col.getService("XPathQueryService", "1.0");
ResourceSet resultSet = service.query(xpath);
I get an empty result even though I know that the document is in there.
If I run the query with:
String xpath = "//command";
I get all of the documents in the collection. Not something you want to do with
xindice unless you have allocated a lot of memory.
Any suggestions about how to run this down would be appreciated.
Pat