lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sachin Kulkarni <>
Subject Re: setting different similarity in config (.alg) file at indexing
Date Sat, 29 Sep 2012 05:01:41 GMT

I found my answer in this:

change no. 34 LUCENE-2959 <>:
Added a variety of different relevance ranking systems to Lucene.
"All models default to the same index-time norm encoding as
DefaultSimilarity, so you can easily try these out/switch back and
forth/run experiments and comparisons without reindexing. Note: most of the
models do rely upon index statistics that are new in Lucene 4.0, so for
existing 3.x indexes its a good idea to upgrade your index to the new
format with IndexUpgrader first."

So basically in my case I do not need to set it in the .alg file.

On Wed, Sep 5, 2012 at 7:58 AM, Sachin Kulkarni <>wrote:

> Hi,
> For Lucene core 4.0. BETA, under the search.similarities help page it says
> the following
> "To change Similarity<>,
> one must do so for both indexing and searching, and the changes must happen
> before either of these actions take place."
> How do I set a different similarity measure while indexing using the alg
> file?
> I know we can use the IndexWriterConfig's setSimilarity using code but am
> not sure what to use in the config file.
>  I want to use a different similarity measure for search.
> Thank you.
> Regards,
> Sachin

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