lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: Syntax help
Date Fri, 14 Apr 2006 18:05:19 GMT
Something that took me a while to get was that the analyzer is important
BOTH in the indexing phase and in the searching phase (assuming you're using
the QueryParser). For you experiment, you probably want to use the
WhitespaceAnalyzer. See page 119 of "Lucene in Action".

The other three most-common analyzers divide text at nonletter characters,
which will do bad things to your path names.....

Also note that you can use the PerFieldAnalyzerWrapper to use, say, the
WhitespaceAnalyzer on the file-path field and other analyzers on other
fields, you're not locked into using the same analyzer for all fields.

Best
Erick


BTW, I really recommend a copy of "Lucene in Action"......

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message