lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Rowe <>
Subject Re: how to search the fields in SimpleAnalyzer
Date Tue, 19 Jun 2007 14:15:00 GMT
Hi Sebastin,

Sebastin wrote:
>       i index my document using SimpleAnalyzer() when i search the Indexed
> field in the searcher class it doesnt give me the me to sort
> out this issue.
> My Code:
> test="9840836598"
> test1="bch01"
> testRecords=(test+" "+test1);
> document.add("testRecords",testRecords,Field.Store.NO,Field.Index.Tokenized)
> indexwriter.addDcument(document,new SimpleAnalyzer());

SimpleAnalyzer "filters LetterTokenizer with LowerCaseFilter"[1].

LetterTokenizer "divides text at non-letters .... [T]okens [are] maximal
strings of adjacent letters"[2].

This means that your index has "bch" as the single token for the
document you added.

Luke[3] is an excellent tool for browsing Lucene indexes (among other
capabilities) - you can use it to help you figure out exactly the issues
you're facing - i.e., how do analyzed documents and queries look.



Steve Rowe
Center for Natural Language Processing

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

View raw message