is it possible to change the way score from different field combine to give final lucene score

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

is it possible to change the way score from different field combine to give final lucene score

Nizamul
Suppose I have two field field1 and field2 and let the score for a query from field1 and field2 are score1 and score2 respectively.now when computing the final lucene score I instead of score1,I want to use some function (f(score1)) of that score.
Reply | Threaded
Open this post in threaded view
|

Re: is it possible to change the way score from different field combine to give final lucene score

Grant Ingersoll-2
See the FunctionQuery and the org.apache.lucene.search.function  
package.  You can also implement your own query, as it's not clear to  
me how exactly you want to calculate the score.  Essentially, you have  
your implementation of BooleanQuery, I think.  Perhaps more details  
would help.

-Grant


On Mar 24, 2008, at 2:26 AM, Nizamul wrote:

> Suppose I have two field field1 and field2 and let the score for a  
> query from field1 and field2 are score1 and score2 respectively.now  
> when computing the final lucene score I instead of score1,I want to  
> use some function (f(score1)) of that score.

--------------------------
Grant Ingersoll
http://www.lucenebootcamp.com
Next Training: April 7, 2008 at ApacheCon Europe in Amsterdam

Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ






---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: is it possible to change the way score from different field combine to give final lucene score

John Wang-9
HI Grant:

     I don't see FunctionQuery in the javadocs. Can you post a link?

Thanks

-john

On Mon, Mar 24, 2008 at 3:32 PM, Grant Ingersoll <[hidden email]>
wrote:

> See the FunctionQuery and the org.apache.lucene.search.function
> package.  You can also implement your own query, as it's not clear to
> me how exactly you want to calculate the score.  Essentially, you have
> your implementation of BooleanQuery, I think.  Perhaps more details
> would help.
>
> -Grant
>
>
> On Mar 24, 2008, at 2:26 AM, Nizamul wrote:
>
> > Suppose I have two field field1 and field2 and let the score for a
> > query from field1 and field2 are score1 and score2 respectively.now
> > when computing the final lucene score I instead of score1,I want to
> > use some function (f(score1)) of that score.
>
> --------------------------
> Grant Ingersoll
> http://www.lucenebootcamp.com
> Next Training: April 7, 2008 at ApacheCon Europe in Amsterdam
>
> Lucene Helpful Hints:
> http://wiki.apache.org/lucene-java/BasicsOfPerformance
> http://wiki.apache.org/lucene-java/LuceneFAQ
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: is it possible to change the way score from different field combine to give final lucene score

Grant Ingersoll-2
http://lucene.apache.org/java/2_3_1/api/org/apache/lucene/search/function/package-summary.html

Sorry, they are called FunctionQuery in Solr, but Lucene calls 'em  
FieldScoreQuery, etc.  Sounds like CustomScoreQuery may do the trick.

HTH
-Grant

On Mar 26, 2008, at 4:34 AM, John Wang wrote:

> HI Grant:
>
>     I don't see FunctionQuery in the javadocs. Can you post a link?
>
> Thanks
>
> -john
>
> On Mon, Mar 24, 2008 at 3:32 PM, Grant Ingersoll <[hidden email]>
> wrote:
>
>> See the FunctionQuery and the org.apache.lucene.search.function
>> package.  You can also implement your own query, as it's not clear to
>> me how exactly you want to calculate the score.  Essentially, you  
>> have
>> your implementation of BooleanQuery, I think.  Perhaps more details
>> would help.
>>
>> -Grant
>>
>>
>> On Mar 24, 2008, at 2:26 AM, Nizamul wrote:
>>
>>> Suppose I have two field field1 and field2 and let the score for a
>>> query from field1 and field2 are score1 and score2 respectively.now
>>> when computing the final lucene score I instead of score1,I want to
>>> use some function (f(score1)) of that score.
>>
>> --------------------------
>> Grant Ingersoll
>> http://www.lucenebootcamp.com
>> Next Training: April 7, 2008 at ApacheCon Europe in Amsterdam
>>
>> Lucene Helpful Hints:
>> http://wiki.apache.org/lucene-java/BasicsOfPerformance
>> http://wiki.apache.org/lucene-java/LuceneFAQ
>>
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]