You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Brian Lamb <br...@journalexperts.com> on 2011/03/09 22:05:10 UTC
Excluding results from more like this
Hi all,
I'm using MoreLikeThis to find similar results but I'd like to exclude
records by the id number. For example, I use the following URL:
http://localhost:8983/solr/search/?q=id:(2 3
5)&mlt=true&mlt.fl=description,id&fl=*,score
How would I exclude record 4 form the MoreLikeThis results?
I tried,
http://localhost:8983/solr/search/?q=id:(2 3
5)&mlt=true&mlt.fl=description,id&fl=*,score&mlt.q=!4
But that still returned record 4 in the MoreLikeThisResults.
Re: Excluding results from more like this
Posted by Jonathan Rochkind <ro...@jhu.edu>.
Yeah, that just restricts what items are in your main result set (and
adding -4 has no real effect).
The more like this set is constructed based on your main result set, for
each document in it.
As far as I can see from here: http://wiki.apache.org/solr/MoreLikeThis
..there seems to be no built-in way to customize the 'more like this'
results in the way you want, excluding certain document id's. I don't
entirely understand what mlt.boost does, but I don't think it does
anything useful for this case.
So, if that's so, you are out of luck, unless you want to write Java
code. In which case you could try customizing or adding that feature to
the MoreLikeThis search component, and either suggest your new code back
as a patch, or just use your own customized version of MoreLikeThis.
On 3/9/2011 4:29 PM, Brian Lamb wrote:
> That doesn't seem to do it. Record 4 is still showing up in the MoreLikeThis
> results.
>
> On Wed, Mar 9, 2011 at 4:12 PM, Otis Gospodnetic<otis_gospodnetic@yahoo.com
>> wrote:
>> Brian,
>>
>> ...?q=id:(2 3 5) -4
>>
>>
>> Otis
>> ---
>> Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
>> Lucene ecosystem search :: http://search-lucene.com/
>>
>>
>>
>> ----- Original Message ----
>>> From: Brian Lamb<br...@journalexperts.com>
>>> To: solr-user@lucene.apache.org
>>> Sent: Wed, March 9, 2011 4:05:10 PM
>>> Subject: Excluding results from more like this
>>>
>>> Hi all,
>>>
>>> I'm using MoreLikeThis to find similar results but I'd like to exclude
>>> records by the id number. For example, I use the following URL:
>>>
>>> http://localhost:8983/solr/search/?q=id:(2 3
>>> 5)&mlt=true&mlt.fl=description,id&fl=*,score
>>>
>>> How would I exclude record 4 form the MoreLikeThis results?
>>>
>>> I tried,
>>>
>>> http://localhost:8983/solr/search/?q=id:(2 3
>>> 5)&mlt=true&mlt.fl=description,id&fl=*,score&mlt.q=!4
>>>
>>> But that still returned record 4 in the MoreLikeThisResults.
>>>
Re: Excluding results from more like this
Posted by Brian Lamb <br...@journalexperts.com>.
That doesn't seem to do it. Record 4 is still showing up in the MoreLikeThis
results.
On Wed, Mar 9, 2011 at 4:12 PM, Otis Gospodnetic <otis_gospodnetic@yahoo.com
> wrote:
> Brian,
>
> ...?q=id:(2 3 5) -4
>
>
> Otis
> ---
> Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
> Lucene ecosystem search :: http://search-lucene.com/
>
>
>
> ----- Original Message ----
> > From: Brian Lamb <br...@journalexperts.com>
> > To: solr-user@lucene.apache.org
> > Sent: Wed, March 9, 2011 4:05:10 PM
> > Subject: Excluding results from more like this
> >
> > Hi all,
> >
> > I'm using MoreLikeThis to find similar results but I'd like to exclude
> > records by the id number. For example, I use the following URL:
> >
> > http://localhost:8983/solr/search/?q=id:(2 3
> > 5)&mlt=true&mlt.fl=description,id&fl=*,score
> >
> > How would I exclude record 4 form the MoreLikeThis results?
> >
> > I tried,
> >
> > http://localhost:8983/solr/search/?q=id:(2 3
> > 5)&mlt=true&mlt.fl=description,id&fl=*,score&mlt.q=!4
> >
> > But that still returned record 4 in the MoreLikeThisResults.
> >
>
Re: Excluding results from more like this
Posted by Otis Gospodnetic <ot...@yahoo.com>.
Brian,
...?q=id:(2 3 5) -4
Otis
---
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
Lucene ecosystem search :: http://search-lucene.com/
----- Original Message ----
> From: Brian Lamb <br...@journalexperts.com>
> To: solr-user@lucene.apache.org
> Sent: Wed, March 9, 2011 4:05:10 PM
> Subject: Excluding results from more like this
>
> Hi all,
>
> I'm using MoreLikeThis to find similar results but I'd like to exclude
> records by the id number. For example, I use the following URL:
>
> http://localhost:8983/solr/search/?q=id:(2 3
> 5)&mlt=true&mlt.fl=description,id&fl=*,score
>
> How would I exclude record 4 form the MoreLikeThis results?
>
> I tried,
>
> http://localhost:8983/solr/search/?q=id:(2 3
> 5)&mlt=true&mlt.fl=description,id&fl=*,score&mlt.q=!4
>
> But that still returned record 4 in the MoreLikeThisResults.
>