lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Diviacco <patrick.divia...@gmail.com>
Subject Re: Lucene nightly build: similarity score per field
Date Fri, 04 Mar 2011 19:12:21 GMT
hey Robert,

I know there is the documentation, I'm sorry I've confused setSimilarity
with setSimilarityProvider.

However, my question was about "Similarity get(String field) method" (I
cannot understand from documentation sorry).

Should I create a customSimilarity class implementing the SimilarityProvider
and then implement the get method ?

Also, inside the get method should I check the passed string field and
return different custom similarities classes ?

thanks
Patrick





On 4 March 2011 19:57, Robert Muir <rcmuir@gmail.com> wrote:

> On Fri, Mar 4, 2011 at 1:18 PM, Patrick Diviacco
> <patrick.diviacco@gmail.com> wrote:
> > So far, I know I can customize the similarity class for the searcher:
> > searcher.setSimilarity(new BoostingSimilarity());
> >
>
> This is not correct.. have you read the javadocs?
>
> IndexSearcher doesn't have a setSimilarity() anymore, it has
> setSimilarityProvider().
> I recommend reading CHANGES.txt, MIGRATE.txt, and the javadocs, where
> this is all documented.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message