lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <gsing...@apache.org>
Subject Re: About TermQuery
Date Mon, 20 Oct 2008 13:11:38 GMT
You should be able to get the clauses from the BooleanQuery: http://lucene.apache.org/java/2_4_0/api/core/org/apache/lucene/search/BooleanQuery.html#clauses()

And, from there, you can do instanceof to determine the query type,  
eventually getting to a TermQuery, where you can do: http://lucene.apache.org/java/2_4_0/api/core/org/apache/lucene/search/Query.html#getBoost()

Every Query has a boost, thus, you can call Query.getBoost().

-Grant

On Oct 20, 2008, at 5:40 AM, Carlos Rodríguez Fernández wrote:

> How can I get the boost value of the subqueries "TermQuery" from a
> BooleanQuery?
> In the Similarity ecuation
> http://lucene.apache.org/java/2_1_0/api/org/apache/lucene/search/Similarity.html
> I don't know how I can get the t.getBoost() value.
>
> Could you help me?
>
> I need it because I need to recalculate the scores of the documents  
> which
> were got from differents crawls. MultiReader is not the solution for  
> me :).
>
> Thanks!
> Carlos

--------------------------
Grant Ingersoll
Lucene Boot Camp Training Nov. 3-4, 2008, ApacheCon US New Orleans.
http://www.lucenebootcamp.com


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










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


Mime
View raw message