lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rakesh Sinha <rakesh.use...@gmail.com>
Subject Searcher#setSimilarity clarifications
Date Mon, 27 Apr 2009 16:53:03 GMT
I am looking into setting custom scoring sing Similarity
(org.apache.lucene.search.Similarity) . Searcher has a method to set
similarity as follows - searcher.setSimilarity(Similarity) and
retrieve the same too. I am looking at a case where I can have just
one Searcher instance and use different similarities for different
queries (since searcher is multi-threaded ).

results = searcher.search( similarity, "myfield:mysearchstring" );

and be ensured that the right similarity is applied for the right
fields to be searched for.  Right now - it would go along the lines of
searcher.setSimilarity(Similarity)  and then followed by the
searcher.search ( .. ) so I cannot do concurrent searches (unless they
are on different searcher instances altogether). Any suggestions
regarding this ? Thanks.

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