FAQ
Hi,

Need some expert opinion on the following.

Lucene 2.3.2
Scenario on searching:
3 Fields - EXACT, KEYWORD, STEM_KEYWORD
EXACT,KEYWORD - uses KeywordAnalyzer
STEM_KEYWORD - uses SnowballAnalyzer(English)
Searching for each field has it's own queries.

I'm using a BooleanQuery to merge the 3 queries. I'm using a default sort parameter for searching.
Ex.
Sort sort = new Sort(new SortField[] {
new SortField(unique field, true),
SortField.FIELD_DOC });
hits = searcher.search(mergedBooleanQuery, sort);

Is this possible? And how do I do this?
Use this sort parameter for the first query (on the EXACT field),
Sort sort = new Sort(new SortField[] { SortField.FIELD_SCORE, new SortField(FieldConstants.ALBUM_PRIORITY, true) });
Add the first query on the BooleanQuery.
While the other two succeeding queries will use the default sort parameter.


Regards,
Jay Joel Malaluan

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedMar 17, '09 at 2:06a
activeMar 17, '09 at 2:06a
posts1
users1
websitelucene.apache.org

1 user in discussion

Jay Joel Malaluan: 1 post

People

Translate

site design / logo © 2022 Grokbase