Hi Ryan,

My approach to this problem looked at modifying the
MoreLikeThisHelper.getMoreLikeThis() methods in
MoreLikeThisHandler.javasource file.

By taking the Query object returned by "mltquery = mlt.like(id);" (line 257)
and "mltquery = mlt.like(reader);" (line 274) and adding additional
BooleanClauses to it before the respective calls to searcher.getDocList()
(lines 269 & 278), I was hoping to modify the query used to generate the
list of related documents ("response") rather than the MoreLikeThis query
itself ("match").

It seemed fairly straightforward at first since the modifications did not
require any changes to the Lucene MoreLikeThis system, however
I ran into some problems because the MoreLikeThisHelper class doesn't have
access to the SolrQueryRequest req object from the MoreLikeThisHandler
class, and since my knowledge of Solr internals is limited I was hoping
someone with a bit more experience would be able to provide some guidance.

thanks,
Tristan



On 7/9/07, Ryan McKinley <[EMAIL PROTECTED]> wrote:

Finer control would be interesting, but it would require substantial
work.  As implemented, the real work happens in lucene contrib queries
MoreLikeThis implementation:


http://svn.apache.org/repos/asf/lucene/java/trunk/contrib/queries/src/java/org/apache/lucene/search/similar/

If you need to modify the query, this is the place to look.

ryan


Tristan Vittorio wrote:
> Hi,
>
> I'm looking for ways to influence the sorting / order of results
> returned by
> the MoreLikeThis request handler, however I don't think this is
achievable
> using only filter queries (please correct me if I'm wrong though).
>
> Ideally, it would be great if MoreLikeThis supported bf (Boost
Functions)
> and possibly bq (Boost Query) parameters accepted by the DisMax handler,
I
> tried to hack the code responsible for these two features into
> MoreLikeThisHandler.java without much success.
>
> Perhaps this additional parameter code implemented in the
> DisMaxRequestHandler could be abstracted to a separate class (e.g.
> CommonRequestHandler) to make it available for other requests handlers?
> (such as MoreLikeThis). Does this make any sense?
>
> cheers,
> Tristan
>


Reply via email to