Hi,

I am indexing XML files.  The XML files have a Location element.  For
example, the Location is /Foo/Bar.html in one of the files.

When I update the index, I want to remove the existing document.  I
search for the Location and delete the existing document like this:

Query query = QueryParser.parse(location, "LOCATION", new
StandardAnalyzer());
Hits hits = searcher.search(query);
for (int i = 0; i < hits.length(); i++) {
        indexReader.delete(hits.id(i));
}

But I never get anything returned from the searcher.  I'm passing in the
exact value that is in the field.  How do I get an exact match of the
field?  Should I be adding Location as Text or Keyword?  I've tried both
but can't get it to return what I want.

Is the problem because I have slashes ("/") in the field?  Does the
StandardAnalyzer filter those out or something?

Any help is appreciated!
Reece

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to