Boosting hits based on a value in a field, without that field contributing to the search

2007-12-07 Thread Tom Emerson
Hello, I'm looking for suggestions on how to deal with the following (simplified) scenario (Lucene 2.2.0): Documents in my index have some number of fields that are searched in various combinations via boolean queries. Each document also contains a field that contains a field that isn't searched

Re: Boosting hits based on a value in a field, without that field contributing to the search

2007-12-07 Thread Tom Emerson
Hi Grant, I was thinking that something in o.a.l.search.function was going to be the route to take, but wanted to hear if there were other ideas from the experts. Thanks! A custom sort wouldn't work in this case because we don't want the items to necessarily be bunched together, rather just have

Re: Boosting hits based on a value in a field, without that field contributing to the search

2007-12-07 Thread Grant Ingersoll
Have a look at the o.a.l.search.function package, which can be used to give boosts to documents based on the value contained in a field. Also, would a custom sort work? -Grant On Dec 7, 2007, at 1:42 PM, Tom Emerson wrote: Hello, I'm looking for suggestions on how to deal with the follow

Re: Boosting hits based on a value in a field, without that field contributing to the search

2007-12-07 Thread Tom Emerson
Erik, Thanks for the response. The issue with (original query) AND (field:foo^boost1 OR field:bar^boost2 OR field:baz^boost3) means that the 'field' must have a value for the query to succeed, which isn't always the case: there could be documents where 'field' has no value. So unless I understan

Re: Boosting hits based on a value in a field, without that field contributing to the search

2007-12-07 Thread Erick Erickson
It seems like doing something like pre-processing the query (or equivlently, adding a BooleanClause to a BooleanQuery) that expressed (your original query) AND (field:foo^boost1 OR field:bar^boost2 OR field:baz^boost3) should do the trick. Or I'm just not understanding what you're doing at all Eri

Re: Boosting hits based on a value in a field, without that field contributing to the search

2007-12-16 Thread chee wu
Saturday, December 08, 2007 5:03 AM Subject: Re: Boosting hits based on a value in a field, without that field contributing to the search > Hi Grant, > > I was thinking that something in o.a.l.search.function was going to be the > route to take, but wanted to hear if there were other idea