lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anshum Gupta (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (SOLR-7143) MoreLikeThis Query Parser does not handle multiple field names
Date Wed, 13 May 2015 20:41:01 GMT

    [ https://issues.apache.org/jira/browse/SOLR-7143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14542663#comment-14542663
] 

Anshum Gupta edited comment on SOLR-7143 at 5/13/15 8:40 PM:
-------------------------------------------------------------

Hi Jens, Sorry but I haven't been able to get to this all this while.

Here's what we need to get working:
# Way to specify multiple values for a field within the local params. e.g.:
{code:title=SOLR-2798 would solve this}
http://localhost:8983/solr/techproducts/select?q={!mlt qf=foo qf=bar}docid
{code}
# We also need to support parameter dereferencing as you suggested, considering we don't want
to get involved with commas:
{code}
http://localhost:8983/solr/techproducts/select?q={!mlt qf=$mlt.fl}docid&mlt.fl=foo&mlt.fl=bar
{code}
Supporting comma's would interfere with the syntax used for things like bf e.g. {{bf=recip(rord(creationDate),1,1000,1000)}}

If you have time and the motivation, it'd be great if you contribute a patch for this. We
may already have parts of it from the existing patch.


was (Author: anshumg):
Hi Jens, Sorry but I haven't been able to get to this all this while.

Here's what we need to get working:
# Way to specify multiple values for a field within the local params. e.g.:
{code:title=SOLR-2798 would solve this}
http://localhost:8983/solr/techproducts/select?q={!mlt qf=foo qf=bar}docid
{code}
# We also need to support parameter dereferencing as you suggested, considering we don't want
to get involved with commas:
{code}
http://localhost:8983/solr/techproducts/select?q={!mlt qf=$mlt.fl}docid&mlt.fl=foo&mlt.fl=bar
{code}
Supporting comma's would interfere with the syntax used for things like bf e.g. {{bf=recip(rord(creationDate),1,1000,1000)}}

> MoreLikeThis Query Parser does not handle multiple field names
> --------------------------------------------------------------
>
>                 Key: SOLR-7143
>                 URL: https://issues.apache.org/jira/browse/SOLR-7143
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 5.0
>            Reporter: Jens Wille
>            Assignee: Anshum Gupta
>         Attachments: SOLR-7143.patch, SOLR-7143.patch
>
>
> The newly introduced MoreLikeThis Query Parser (SOLR-6248) does not return any results
when supplied with multiple fields in the {{qf}} parameter.
> To reproduce within the techproducts example, compare:
> {code}
> curl 'http://localhost:8983/solr/techproducts/select?q=%7B!mlt+qf=name%7DMA147LL/A'
> curl 'http://localhost:8983/solr/techproducts/select?q=%7B!mlt+qf=features%7DMA147LL/A'
> curl 'http://localhost:8983/solr/techproducts/select?q=%7B!mlt+qf=name,features%7DMA147LL/A'
> {code}
> The first two queries return 8 and 5 results, respectively. The third query doesn't return
any results (not even the matched document).
> In contrast, the MoreLikeThis Handler works as expected (accounting for the default {{mintf}}
and {{mindf}} values in SimpleMLTQParser):
> {code}
> curl 'http://localhost:8983/solr/techproducts/mlt?q=id:MA147LL/A&mlt.fl=name&mlt.mintf=1&mlt.mindf=1'
> curl 'http://localhost:8983/solr/techproducts/mlt?q=id:MA147LL/A&mlt.fl=features&mlt.mintf=1&mlt.mindf=1'
> curl 'http://localhost:8983/solr/techproducts/mlt?q=id:MA147LL/A&mlt.fl=name,features&mlt.mintf=1&mlt.mindf=1'
> {code}
> After adding the following line to {{example/techproducts/solr/techproducts/conf/solrconfig.xml}}:
> {code:language=XML}
> <requestHandler name="/mlt" class="solr.MoreLikeThisHandler" />
> {code}
> The first two queries return 7 and 4 results, respectively (excluding the matched document).
The third query returns 7 results, as one would expect.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message