FAQ
Hi!

How comes that stop words show up in index (HighFreqTerms)? Yes, I do you the
same analyzer for indexing and searching.

class SearchFacade
{
private final static String[] GERMAN_STOP_WORDS = new String[] { "foo",
"bar" };
private final static Analyzer GERMAN_ANALYZER = new
SnowballAnalyzer( "German2", GERMAN_STOP_WORDS );

public void index()
{
writer = new IndexWriter( Configuration.Lucene.INDEX, GERMAN_ANALYZER,
true );
...
}

public void search(String q)
{
final Query q = MultiFieldQueryParser.parse( query, new String[] { "blah",
"foo", "bar" }, GERMAN_ANALYZER );
...
}
}

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedJun 19, '04 at 11:25a
activeJun 19, '04 at 11:25a
posts1
users1
websitelucene.apache.org

1 user in discussion

Lucene: 1 post

People

Translate

site design / logo © 2022 Grokbase