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 pr...@bigbasket.com, pr...@bigbasket.com on 2018/05/17 07:03:48 UTC

Sorting on pseudo field(The one which is added during doctransformer)

Hi all,

I wanted to ask is it possible to sort on the field which is added during DocTransformer. 
I'm referring to something like this: (https://mariofebbraio.files.wordpress.com/2014/10/doctransformer.png) here the price is added using doctransformer so is it possible to sort on this field if I add that field dynamically to the every returned document. If Yes, Can you please guide me like how to go about it.

Can anyone also tell me like at what stage sorting is performed after doctransformer or after the requestHandler??

Sorry if you find these queries silly but I'm really confused where all this happens.

Thanks in advance.


Regards,
Prateek

Re: Sorting on pseudo field(The one which is added during doctransformer)

Posted by pr...@bigbasket.com, pr...@bigbasket.com.
Thanks, Mikhail

On 2018/05/18 11:33:09, Mikhail Khludnev <mk...@apache.org> wrote: 
> Right
> https://wiki.apache.org/solr/SolrPlugins#ValueSourceParser
> 
> On Fri, May 18, 2018 at 8:04 AM, prateek.agarwal@bigbasket.com <
> prateek.agarwal@bigbasket.com> wrote:
> 
> > Hi Mikhail,
> >
> > I think you forgot to link the reference.
> >
> > Thanks
> >
> >
> > Regards,
> > Prateek
> >
> > On 2018/05/17 13:18:22, Mikhail Khludnev <mk...@apache.org> wrote:
> > > Here is the reference I've found so far.
> > >
> > > On Thu, May 17, 2018 at 12:26 PM, prateek.agarwal@bigbasket.com <
> > > prateek.agarwal@bigbasket.com> wrote:
> > >
> > > >
> > > > Hi Mikhail,
> > > >
> > > > > You can either sort by function that needs to turn the logic into
> > value
> > > > > source parser.
> > > >
> > > > But like my requirement for this was to add a field dynamically from
> > cache
> > > > or external source to the returned documents from the solr and perform
> > > > sorting in the solr itself if required otherwise use the score to sort.
> > > > So how would you advise to go about this??
> > > >
> > > > And how to go about your way "to turn the logic into value source
> > parser"
> > > > like how to do this for this case??
> > > >
> > > >
> > > > > If you need to toss just result page, check rerank.
> > > >
> > > > I don't want to use it to rank the relevancy of results.
> > > >
> > > > Thanks for the response.
> > > >
> > > >
> > > >
> > > > Regards,
> > > > Prateek
> > > >
> > >
> > >
> > >
> > > --
> > > Sincerely yours
> > > Mikhail Khludnev
> > >
> >
> 
> 
> 
> -- 
> Sincerely yours
> Mikhail Khludnev
> 

Re: Sorting on pseudo field(The one which is added during doctransformer)

Posted by Mikhail Khludnev <mk...@apache.org>.
Right
https://wiki.apache.org/solr/SolrPlugins#ValueSourceParser

On Fri, May 18, 2018 at 8:04 AM, prateek.agarwal@bigbasket.com <
prateek.agarwal@bigbasket.com> wrote:

> Hi Mikhail,
>
> I think you forgot to link the reference.
>
> Thanks
>
>
> Regards,
> Prateek
>
> On 2018/05/17 13:18:22, Mikhail Khludnev <mk...@apache.org> wrote:
> > Here is the reference I've found so far.
> >
> > On Thu, May 17, 2018 at 12:26 PM, prateek.agarwal@bigbasket.com <
> > prateek.agarwal@bigbasket.com> wrote:
> >
> > >
> > > Hi Mikhail,
> > >
> > > > You can either sort by function that needs to turn the logic into
> value
> > > > source parser.
> > >
> > > But like my requirement for this was to add a field dynamically from
> cache
> > > or external source to the returned documents from the solr and perform
> > > sorting in the solr itself if required otherwise use the score to sort.
> > > So how would you advise to go about this??
> > >
> > > And how to go about your way "to turn the logic into value source
> parser"
> > > like how to do this for this case??
> > >
> > >
> > > > If you need to toss just result page, check rerank.
> > >
> > > I don't want to use it to rank the relevancy of results.
> > >
> > > Thanks for the response.
> > >
> > >
> > >
> > > Regards,
> > > Prateek
> > >
> >
> >
> >
> > --
> > Sincerely yours
> > Mikhail Khludnev
> >
>



-- 
Sincerely yours
Mikhail Khludnev

Re: Sorting on pseudo field(The one which is added during doctransformer)

Posted by pr...@bigbasket.com, pr...@bigbasket.com.
Hi Mikhail,

I think you forgot to link the reference.

Thanks


Regards,
Prateek

On 2018/05/17 13:18:22, Mikhail Khludnev <mk...@apache.org> wrote: 
> Here is the reference I've found so far.
> 
> On Thu, May 17, 2018 at 12:26 PM, prateek.agarwal@bigbasket.com <
> prateek.agarwal@bigbasket.com> wrote:
> 
> >
> > Hi Mikhail,
> >
> > > You can either sort by function that needs to turn the logic into value
> > > source parser.
> >
> > But like my requirement for this was to add a field dynamically from cache
> > or external source to the returned documents from the solr and perform
> > sorting in the solr itself if required otherwise use the score to sort.
> > So how would you advise to go about this??
> >
> > And how to go about your way "to turn the logic into value source parser"
> > like how to do this for this case??
> >
> >
> > > If you need to toss just result page, check rerank.
> >
> > I don't want to use it to rank the relevancy of results.
> >
> > Thanks for the response.
> >
> >
> >
> > Regards,
> > Prateek
> >
> 
> 
> 
> -- 
> Sincerely yours
> Mikhail Khludnev
> 

Re: Sorting on pseudo field(The one which is added during doctransformer)

Posted by Mikhail Khludnev <mk...@apache.org>.
Here is the reference I've found so far.

On Thu, May 17, 2018 at 12:26 PM, prateek.agarwal@bigbasket.com <
prateek.agarwal@bigbasket.com> wrote:

>
> Hi Mikhail,
>
> > You can either sort by function that needs to turn the logic into value
> > source parser.
>
> But like my requirement for this was to add a field dynamically from cache
> or external source to the returned documents from the solr and perform
> sorting in the solr itself if required otherwise use the score to sort.
> So how would you advise to go about this??
>
> And how to go about your way "to turn the logic into value source parser"
> like how to do this for this case??
>
>
> > If you need to toss just result page, check rerank.
>
> I don't want to use it to rank the relevancy of results.
>
> Thanks for the response.
>
>
>
> Regards,
> Prateek
>



-- 
Sincerely yours
Mikhail Khludnev

Re: Sorting on pseudo field(The one which is added during doctransformer)

Posted by pr...@bigbasket.com, pr...@bigbasket.com.
Hi Mikhail,

> You can either sort by function that needs to turn the logic into value
> source parser.

But like my requirement for this was to add a field dynamically from cache or external source to the returned documents from the solr and perform sorting in the solr itself if required otherwise use the score to sort.
So how would you advise to go about this??

And how to go about your way "to turn the logic into value source parser" like how to do this for this case??


> If you need to toss just result page, check rerank.

I don't want to use it to rank the relevancy of results.

Thanks for the response.



Regards,
Prateek

Re: Sorting on pseudo field(The one which is added during doctransformer)

Posted by Mikhail Khludnev <mk...@apache.org>.
Prateek,
It's too late to sort on transformer result.
You can either sort by function that needs to turn the logic into value
source parser.
If you need to toss just result page, check rerank.

On Thu, May 17, 2018 at 10:03 AM, prateek.agarwal@bigbasket.com <
prateek.agarwal@bigbasket.com> wrote:

> Hi all,
>
> I wanted to ask is it possible to sort on the field which is added during
> DocTransformer.
> I'm referring to something like this: (https://mariofebbraio.files.
> wordpress.com/2014/10/doctransformer.png) here the price is added using
> doctransformer so is it possible to sort on this field if I add that field
> dynamically to the every returned document. If Yes, Can you please guide me
> like how to go about it.
>
> Can anyone also tell me like at what stage sorting is performed after
> doctransformer or after the requestHandler??
>
> Sorry if you find these queries silly but I'm really confused where all
> this happens.
>
> Thanks in advance.
>
>
> Regards,
> Prateek
>



-- 
Sincerely yours
Mikhail Khludnev