lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doron Cohen (JIRA)" <>
Subject [jira] Assigned: (LUCENE-789) Custom similarity is ignored when using MultiSearcher
Date Tue, 24 Apr 2007 23:21:15 GMT


Doron Cohen reassigned LUCENE-789:

    Assignee: Doron Cohen

> Custom similarity is ignored when using MultiSearcher
> -----------------------------------------------------
>                 Key: LUCENE-789
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Search
>    Affects Versions: 2.0.1
>            Reporter: Alexey Lef
>         Assigned To: Doron Cohen
>         Attachments:
> Symptoms:
> I am using Searcher.setSimilarity() to provide a custom similarity that turns off tf()
factor. However, somewhere along the way the custom similarity is ignored and the DefaultSimilarity
is used. I am using MultiSearcher and BooleanQuery.
> Problem analysis:
> The problem seems to be in MultiSearcher.createWeight(Query) method. It creates an instance
of CachedDfSource but does not set the similarity. As the result CachedDfSource provides DefaultSimilarity
to queries that use it.
> Potential solution:
> Adding the following line:
>     cacheSim.setSimilarity(getSimilarity());
> after creating an instance of CacheDfSource (line 312) seems to fix the problem. However,
I don't understand enough of the inner workings of this class to be absolutely sure that this
is the right thing to do.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message