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 Pratik Patel <pr...@semandex.net> on 2019/01/21 03:13:55 UTC

Get MLT Interesting Terms for a set of documents corresponding to the query specified

Hi Everyone!

I am trying to use MLT request handler. My query matches more than one
documents but the response always seems to pick up the first document and
interestingTerms also seems to be corresponding to that single document
only.

What I am expecting is that if my query matches multiple documents then the
InterestingTerms handler result also corresponds to that set of documents
and not the first document.

Following is my query,

http://localhost:8081/solr/collection1/mlt?debugQuery=on&fq=tags:test&mlt.boost=true&mlt.fl=mlt.fl=textpropertymlt&mlt.interestingTerms=details&mlt.mindf=1&mlt.mintf=2&mlt.minwl=3&q=*:*&rows=100&rows=2&start=0

Ultimately, my goal is to get interesting terms corresponding to this whole
set of documents. I don't need similar documents as such. If not with mlt,
is there any other way I can achieve this? that is, given a query matching
set of documents, find interestingTerms for that set of documents based on
tf-idf?

Thanks!
Pratik

Re: Get MLT Interesting Terms for a set of documents corresponding to the query specified

Posted by Pratik Patel <pr...@semandex.net>.
I will certainly try it out. Thanks!


On Mon, Jan 21, 2019 at 8:48 PM Joel Bernstein <jo...@gmail.com> wrote:

> You find the significantTerms streaming expressions useful:
>
>
> https://lucene.apache.org/solr/guide/7_6/stream-source-reference.html#significantterms
>
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
>
> On Mon, Jan 21, 2019 at 3:02 PM Pratik Patel <pr...@semandex.net> wrote:
>
> > Aman,
> >
> > Thanks for the reply!
> >
> > I have tried with corrected query but it doesn't solve the problem. also,
> > my tags filter matches multiple documents, however the interestingTerms
> > seems to correspond to just the first document.
> > Here is an example of a query which matches 1900 documents.
> >
> >
> >
> http://localhost:8081/solr/collection1/mlt?debugQuery=on&q=tags:voltage&mlt.boost=true&mlt.fl=my_field&mlt.interestingTerms=details&mlt.mindf=1&mlt.mintf=2&mlt.minwl=3&q=*:*&rows=100&start=0
> >
> >
> > Thanks,
> > Pratik
> >
> >
> > On Mon, Jan 21, 2019 at 2:52 PM Aman Tandon <am...@gmail.com>
> > wrote:
> >
> > > I see two rows params, looks like which will be overwritten by rows=2,
> > and
> > > then your tags filter is resulting only one document. Please remove
> extra
> > > rows and try.
> > >
> > > On Mon, Jan 21, 2019, 08:44 Pratik Patel <pratik@semandex.net wrote:
> > >
> > > > Hi Everyone!
> > > >
> > > > I am trying to use MLT request handler. My query matches more than
> one
> > > > documents but the response always seems to pick up the first document
> > and
> > > > interestingTerms also seems to be corresponding to that single
> document
> > > > only.
> > > >
> > > > What I am expecting is that if my query matches multiple documents
> then
> > > the
> > > > InterestingTerms handler result also corresponds to that set of
> > documents
> > > > and not the first document.
> > > >
> > > > Following is my query,
> > > >
> > > >
> > > >
> > >
> >
> http://localhost:8081/solr/collection1/mlt?debugQuery=on&fq=tags:test&mlt.boost=true&mlt.fl=mlt.fl=textpropertymlt&mlt.interestingTerms=details&mlt.mindf=1&mlt.mintf=2&mlt.minwl=3&q=*:*&rows=100&rows=2&start=0
> > > >
> > > > Ultimately, my goal is to get interesting terms corresponding to this
> > > whole
> > > > set of documents. I don't need similar documents as such. If not with
> > > mlt,
> > > > is there any other way I can achieve this? that is, given a query
> > > matching
> > > > set of documents, find interestingTerms for that set of documents
> based
> > > on
> > > > tf-idf?
> > > >
> > > > Thanks!
> > > > Pratik
> > > >
> > >
> >
>

Re: Get MLT Interesting Terms for a set of documents corresponding to the query specified

Posted by Joel Bernstein <jo...@gmail.com>.
You find the significantTerms streaming expressions useful:

https://lucene.apache.org/solr/guide/7_6/stream-source-reference.html#significantterms


Joel Bernstein
http://joelsolr.blogspot.com/


On Mon, Jan 21, 2019 at 3:02 PM Pratik Patel <pr...@semandex.net> wrote:

> Aman,
>
> Thanks for the reply!
>
> I have tried with corrected query but it doesn't solve the problem. also,
> my tags filter matches multiple documents, however the interestingTerms
> seems to correspond to just the first document.
> Here is an example of a query which matches 1900 documents.
>
>
> http://localhost:8081/solr/collection1/mlt?debugQuery=on&q=tags:voltage&mlt.boost=true&mlt.fl=my_field&mlt.interestingTerms=details&mlt.mindf=1&mlt.mintf=2&mlt.minwl=3&q=*:*&rows=100&start=0
>
>
> Thanks,
> Pratik
>
>
> On Mon, Jan 21, 2019 at 2:52 PM Aman Tandon <am...@gmail.com>
> wrote:
>
> > I see two rows params, looks like which will be overwritten by rows=2,
> and
> > then your tags filter is resulting only one document. Please remove extra
> > rows and try.
> >
> > On Mon, Jan 21, 2019, 08:44 Pratik Patel <pratik@semandex.net wrote:
> >
> > > Hi Everyone!
> > >
> > > I am trying to use MLT request handler. My query matches more than one
> > > documents but the response always seems to pick up the first document
> and
> > > interestingTerms also seems to be corresponding to that single document
> > > only.
> > >
> > > What I am expecting is that if my query matches multiple documents then
> > the
> > > InterestingTerms handler result also corresponds to that set of
> documents
> > > and not the first document.
> > >
> > > Following is my query,
> > >
> > >
> > >
> >
> http://localhost:8081/solr/collection1/mlt?debugQuery=on&fq=tags:test&mlt.boost=true&mlt.fl=mlt.fl=textpropertymlt&mlt.interestingTerms=details&mlt.mindf=1&mlt.mintf=2&mlt.minwl=3&q=*:*&rows=100&rows=2&start=0
> > >
> > > Ultimately, my goal is to get interesting terms corresponding to this
> > whole
> > > set of documents. I don't need similar documents as such. If not with
> > mlt,
> > > is there any other way I can achieve this? that is, given a query
> > matching
> > > set of documents, find interestingTerms for that set of documents based
> > on
> > > tf-idf?
> > >
> > > Thanks!
> > > Pratik
> > >
> >
>

Re: Get MLT Interesting Terms for a set of documents corresponding to the query specified

Posted by Pratik Patel <pr...@semandex.net>.
Aman,

Thanks for the reply!

I have tried with corrected query but it doesn't solve the problem. also,
my tags filter matches multiple documents, however the interestingTerms
seems to correspond to just the first document.
Here is an example of a query which matches 1900 documents.

http://localhost:8081/solr/collection1/mlt?debugQuery=on&q=tags:voltage&mlt.boost=true&mlt.fl=my_field&mlt.interestingTerms=details&mlt.mindf=1&mlt.mintf=2&mlt.minwl=3&q=*:*&rows=100&start=0


Thanks,
Pratik


On Mon, Jan 21, 2019 at 2:52 PM Aman Tandon <am...@gmail.com> wrote:

> I see two rows params, looks like which will be overwritten by rows=2, and
> then your tags filter is resulting only one document. Please remove extra
> rows and try.
>
> On Mon, Jan 21, 2019, 08:44 Pratik Patel <pratik@semandex.net wrote:
>
> > Hi Everyone!
> >
> > I am trying to use MLT request handler. My query matches more than one
> > documents but the response always seems to pick up the first document and
> > interestingTerms also seems to be corresponding to that single document
> > only.
> >
> > What I am expecting is that if my query matches multiple documents then
> the
> > InterestingTerms handler result also corresponds to that set of documents
> > and not the first document.
> >
> > Following is my query,
> >
> >
> >
> http://localhost:8081/solr/collection1/mlt?debugQuery=on&fq=tags:test&mlt.boost=true&mlt.fl=mlt.fl=textpropertymlt&mlt.interestingTerms=details&mlt.mindf=1&mlt.mintf=2&mlt.minwl=3&q=*:*&rows=100&rows=2&start=0
> >
> > Ultimately, my goal is to get interesting terms corresponding to this
> whole
> > set of documents. I don't need similar documents as such. If not with
> mlt,
> > is there any other way I can achieve this? that is, given a query
> matching
> > set of documents, find interestingTerms for that set of documents based
> on
> > tf-idf?
> >
> > Thanks!
> > Pratik
> >
>

Re: Get MLT Interesting Terms for a set of documents corresponding to the query specified

Posted by Aman Tandon <am...@gmail.com>.
I see two rows params, looks like which will be overwritten by rows=2, and
then your tags filter is resulting only one document. Please remove extra
rows and try.

On Mon, Jan 21, 2019, 08:44 Pratik Patel <pratik@semandex.net wrote:

> Hi Everyone!
>
> I am trying to use MLT request handler. My query matches more than one
> documents but the response always seems to pick up the first document and
> interestingTerms also seems to be corresponding to that single document
> only.
>
> What I am expecting is that if my query matches multiple documents then the
> InterestingTerms handler result also corresponds to that set of documents
> and not the first document.
>
> Following is my query,
>
>
> http://localhost:8081/solr/collection1/mlt?debugQuery=on&fq=tags:test&mlt.boost=true&mlt.fl=mlt.fl=textpropertymlt&mlt.interestingTerms=details&mlt.mindf=1&mlt.mintf=2&mlt.minwl=3&q=*:*&rows=100&rows=2&start=0
>
> Ultimately, my goal is to get interesting terms corresponding to this whole
> set of documents. I don't need similar documents as such. If not with mlt,
> is there any other way I can achieve this? that is, given a query matching
> set of documents, find interestingTerms for that set of documents based on
> tf-idf?
>
> Thanks!
> Pratik
>