Posted By:
Tony_Crisera
Posted On:
Friday, June 30, 2006 07:30 AM
Hi, I'm pretty new to Lucene and would appreciate some direction. Sorry if this is a repost, I tried yesterday, but that doesn't appear I am creating an index with documents that have a bunch of fields from a database view. For searching there is a web page that presents a number of checkboxes, dropdowns, and keyword field. I am using term queries added to a boolean query with BooleanClause.Occur.SHOULD for all criteria selected. What I want is a hit list with documents with the most matching criteria at the top. i.e. 2 matching fields, followed by 1 matching field, followed by 0. I also want to limit the hit list to a maximum number of docs. The problem is if the user enters no criteria and submits, I still want to return
More>>
Hi, I'm pretty new to Lucene and would appreciate some direction. Sorry if this is a repost, I tried yesterday, but that doesn't appear
I am creating an index with documents that have a bunch of fields from a database view. For searching there is a web page that presents a number of checkboxes, dropdowns, and keyword field. I am using term queries added to a boolean query with BooleanClause.Occur.SHOULD for all criteria selected.
What I want is a hit list with documents with the most matching criteria at the top. i.e. 2 matching fields, followed by 1 matching field, followed by 0. I also want to limit the hit list to a maximum number of docs.
The problem is if the user enters no criteria and submits, I still want to return documents. Right now I get hits for any criteria I add that has a match, but nothing more. I'm not sure how the SHOULD is supposed to work for a boolean clause.
Any help is appreciated. Thanks, -TC
<<Less