lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Fields with phrases
Date Mon, 11 Sep 2006 18:20:22 GMT

: I have a field called "location" on my index. For example, this string:  "A
: B" "A C" D was stored on my index
: When I search for "location: ", these are the results that I'd like to
: retrieve:
: 1) location: D -- 1 hit
: 2) location: A -- no hits
: 3) location: "A B" -- 1 hit
: 4) location: "A C" -- 1 hit

off the cuff, it sounds like what you want is to index your individual
quoted strings as single token field values (using UN_TOKENIZED or the
KeywordAnalyzer at index time) if you want your matches to be case
insensative, or if you what white space normalization (ie: 'should "A  c"
be a match?) then you may need your own analyzer to deal with that ... but
the cruz of the issue is putting D in as a token, and "A B" as one token,
and "A C" as one token, etc...

there was a very long thread baout this recently...

http://www.nabble.com/Phrase-search-using-quotes----special-Tokenizer-tf2200760.html



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message