lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wilton, Reece" <>
Subject Getting an exact field match
Date Wed, 02 Jul 2003 18:44:36 GMT

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
Hits hits =;
for (int i = 0; i < hits.length(); 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!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message