lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jreeman <mimo...@hotmail.com>
Subject Re: [jira] Question about hits scores
Date Mon, 05 Mar 2007 12:59:57 GMT

Yes it works fine.

Thanks.

Chris Hostetter wrote:
> 
> 
> 1) questions about using Lucene are best sent to the java-user list ... it
> is for people asking questions about "using" the java lucene library
> (java-dev is for quesions about "developing" the java lucene library) ...
> you are more likley to get answers to questions faster on the java-user
> list.
> 
> 2) calling the idf method does not modify the Similarity object ... the
> idf method is what gets called during scoring.
> 
> if you wnat to change the idf method, you need to subclass
> DefaultSimilarity, override the idf method, and then pass an instance of
> your subclass to searcher.setSimilarity.
> 
> 
> 
> 
> : Date: Fri, 2 Mar 2007 04:23:49 -0800 (PST)
> : From: jreeman <mimounl@hotmail.com>
> : Reply-To: java-dev@lucene.apache.org
> : To: java-dev@lucene.apache.org
> : Subject: Re: [jira] Question about hits scores
> :
> :
> : I have been overwriting the Similarity class of the searcher like this :
> :
> : 	DefaultSimilarity similarity = new DefaultSimilarity();
> : 	similarity.idf(0, 1); // idf is set to 1 whithis line of code
> : 	searcher.setSimilarity(similarity);
> : 	hits=searcher.search(l_query);
> :
> : But it does not modify the hit score.
> :
> : Do you have any suggestions ?
> :
> : jreeman wrote:
> : >
> : > Ok the score depends on the frequence of the hit for each metadata
> value.
> : >
> : > My question is now how to make the score independant from the
> frequency of
> : > a result ?
> : >
> : >
> : >
> : > jreeman wrote:
> : >>
> : >> Hello,
> : >>
> : >> here is the query I am sending to lucene :
> : >>
> : >> +(document_type:type0one +document_type:type0twenty0one) 
> +state:live0
> : >>
> : >> document_type and state are meta-datas. 0 is used as a separator in
> : >> "type0one " and "type0twenty0one".
> : >>
> : >> I was thinking that the hits scores would be all set to 100% but it
> is
> : >> not the case :
> : >>
> : >> I have this score :
> : >>
> : >> 1 hit typetype0one, score 100%
> : >> 1 hit type0twenty0one, score 80%
> : >> 1 hit type0twenty0one, score 80%
> : >>
> : >> I am using a standart analyzer with no stop words.
> : >>
> : >> I don't understand why I don't have all hits with 100% for score.
> : >>
> : >> Do you have some explanation ?
> : >>
> : >> Thanks in advance.
> : >>
> : >
> : >
> :
> : --
> : View this message in context:
> http://www.nabble.com/Question-about-hits-scores-tf3332761.html#a9268663
> : Sent from the Lucene - Java Developer mailing list archive at
> Nabble.com.
> :
> :
> : ---------------------------------------------------------------------
> : To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> : For additional commands, e-mail: java-dev-help@lucene.apache.org
> :
> 
> 
> 
> -Hoss
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Question-about-hits-scores-tf3332761.html#a9311010
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.


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


Mime
View raw message