lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ajinkya Kale <kaleajin...@gmail.com>
Subject Re: Question related to reranking and RankQuery
Date Sat, 19 Sep 2015 01:17:01 GMT
Is there a way to do something like
q=hello+world&rq={!rerank reRankQuery=$rqq
reRankDocs=100}&rqq=sort={!func}myFunc() desc ?

or even as simple as


   1.
   http://localhost:8983/solr/0/select?q=edgengram:abc&wt=json&indent=true&debugQuery=true&rq={!rerank
   reRankQuery=$rqq reRankDocs=20}&rqq=sort=some_field desc

I am not able to get the last part right. I dont think my rqq is right.

--aj

On Fri, Sep 18, 2015 at 12:00 PM Joel Bernstein <joelsolr@gmail.com> wrote:

> The syntax would be something like this:
>
> q=hello+world&rq={!rerank reRankQuery=$rqq
> reRankDocs=100}&rqq={!func}myFunc()
>
> I'm not sure if there is a test case demonstrating this but it should work.
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
> On Fri, Sep 18, 2015 at 2:42 PM, Ajinkya Kale <kaleajinkya@gmail.com>
> wrote:
>
> > Is there a way I can issue a regular query with q and then apply
> > functionQuery only on the top n documents of the result from q ?
> > Applying functionQuery on all documents will be very expensive in my
> case.
> > I am not able to find a way to "rerank" only top N documents using
> Function
> > Query.
> >
> > --aj
> >
> > On Fri, Sep 18, 2015 at 5:04 AM Joel Bernstein <joelsolr@gmail.com>
> wrote:
> >
> > > The ReRankQuery re-ranks the Top N documents of the main query based
> on a
> > > query. Rather then the CustomScoreQuery you may want to look at
> ReRanking
> > > by a Function Query using the FunctionQParserPlugin. This would allow
> you
> > > to directly control the ReRankScore for the top N documents.
> > >
> > > Writing your own RankQuery should be the last resort if you can't make
> a
> > > Function Query do what you need to do.
> > >
> > >
> > >
> > > Joel Bernstein
> > > http://joelsolr.blogspot.com/
> > >
> > > On Thu, Sep 17, 2015 at 10:44 PM, Ajinkya Kale <kaleajinkya@gmail.com>
> > > wrote:
> > >
> > > > Hi all,
> > > >
> > > > I am new to Solr. I have a QParser plugin which uses an
> implementation
> > > > of CustomScoreQuery to provide custom score for each document.
> > > > Is there a way I can use the same plugin to provide score for top N
> > > > documents after an initial query/sort ?
> > > > I looked at the ReRankQParserPlugin but it looks lot more involved to
> > > write
> > > > a custom RankQuery implementation. So I was thinking if I can reuse
> my
> > > > existing CustomScoreQuery implementation to provide score for top N
> > > > documents to rerank.
> > > >
> > > > On a side note, is there a place where the ReRankQParserPlugin is
> > > explained
> > > > in detail ?
> > > >
> > > > --aj
> > > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message