lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robichaud, Jean-Philippe" <Jean-Philippe.Robich...@scansoft.com>
Subject RE: PerFieldSimilarity
Date Wed, 04 May 2005 20:51:39 GMT
How cool, I did not knew that...  that may help me...  If I understand you
correctly, I can create a boolean query where each "clause" use a different
similarity ?

Thanks, 

Jp

___________________________________________________________________________
SpeechWorks solutions from ScanSoft. Inspired Applications, Exceptional
Results
 
<Jean-Philippe Robichaud >  ::  Solution Speech Scientist
ScanSoft :: Professional Services
5100-75 Queen Street, Montreal, QC
P +1 514 843 4884 
 

-----Original Message-----
From: Doug Cutting [mailto:cutting@apache.org] 
Sent: Wednesday, May 04, 2005 4:45 PM
To: java-user@lucene.apache.org
Subject: Re: PerFieldSimilarity

Robichaud, Jean-Philippe wrote:
> Again, I can change
> the similarity of the reader at run-time and issue specific queries,
summing
> the score myself, but that is pretty inefficient.

You can also specify a Similarity implementation per Query node in a 
complex query, e.g.:

BooleanQuery query = new BooleanQuery() {
   public Similarity getSimilarity(Searcher searcher) {
     return new DefaultSimilarity {
        ... override Similarity methods here ...
     };
   }
}

Doug

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

---------------------------------------------------------------------
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