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 Venkateswarlu Bommineni <bv...@gmail.com> on 2019/07/21 02:45:48 UTC

Add certain documents right after particular document

Hello Team,

Apologies , if you feel this question is silly and weird.

Here is the scenario I am trying to achieve.

1) Customers come to PCAT (Product category/listing pages) [we hit Solr to
get the results]
2) Customer selects a product and goes to product details page.
3) When customer comes back to PCAT , we will hit third party service and
get some recommendations.
*problem : W*e want to add those recommendations right after the product
that customer viewed previously.

Is there any way we can tell to Solr to add those products right after a
particular product while giving us the response ?


Thanks,
Venkat.

Re: Add certain documents right after particular document

Posted by Yogendra Kumar Soni <yo...@dolcera.com>.
Grouping can be used,
Suppose you have recommendations 2,3 for id 1 and 6 for id 5. You can use
group query to get these document together.
group.query=id:(1 OR 2 OR 3)&group.query=id:(5 OR 6)


On Sun 21 Jul, 2019, 9:47 AM Venkateswarlu Bommineni, <bv...@gmail.com>
wrote:

> Thanks Saurabh for quick response.
>
> Did you mean to index recommended products as child documents ? and get
> them back using block join to get the results ?
>
> If yes , difficulty is recommendations are very dynamic and they totally
> depends on the user's session and how many products and type of the product
> he has viewed. so Its really impossible to index them.
>
> Thanks,
> Venkat.
>
> On Sat, Jul 20, 2019 at 9:07 PM Saurabh Sharma <saurabh.infoedge@gmail.com
> >
> wrote:
>
> > Hi,
> >
> > You can add recommendations as child documents and use block join for
> > retrieval. By adding as child it will easy for you to keep track of the
> > recommendations.
> >
> > Thanks
> > Saurabh
> >
> > On Sun, Jul 21, 2019, 8:16 AM Venkateswarlu Bommineni <bv...@gmail.com>
> > wrote:
> >
> > > Hello Team,
> > >
> > > Apologies , if you feel this question is silly and weird.
> > >
> > > Here is the scenario I am trying to achieve.
> > >
> > > 1) Customers come to PCAT (Product category/listing pages) [we hit Solr
> > to
> > > get the results]
> > > 2) Customer selects a product and goes to product details page.
> > > 3) When customer comes back to PCAT , we will hit third party service
> and
> > > get some recommendations.
> > > *problem : W*e want to add those recommendations right after the
> product
> > > that customer viewed previously.
> > >
> > > Is there any way we can tell to Solr to add those products right after
> a
> > > particular product while giving us the response ?
> > >
> > >
> > > Thanks,
> > > Venkat.
> > >
> >
>

Re: Add certain documents right after particular document

Posted by Venkateswarlu Bommineni <bv...@gmail.com>.
Thanks for your reply Alex and Yogendra.

@Yogendra: I have tried with grouping but it did not work. I will recheck
again if I am missing somethin.

@Alex : Recommendations are some of the products  that comes from Solr.
 Here is the scenario:
1) We get 100 products from Solr on product listing page.
2) Customer viewed 21st product and comes back to product listing page.
3) While load products listing page again , we invoke a third party service
and get some recommendations ( which are some products out of those hundred
products). Now we want to put those recommendations right after last viewed
product.

Is there anyway we can ask Solr to put those products rt after a product in
the response.


Thanks,
Venkat.


On Sun, Jul 21, 2019 at 7:07 AM Alexandre Rafalovitch <ar...@gmail.com>
wrote:

> So, if the recommendations are dynamic and come from outside Solr, why
> do you need Solr to do anything at this stage? Sounds like the
> original result list is where Solr responsibility ends.
>
> You are not exposing Solr directly to the UI (you should not), so
> whatever your middleware is, can be coded any way you want.
>
> Regards,
>    Alex.
>
> On Sun, 21 Jul 2019 at 00:17, Venkateswarlu Bommineni <bv...@gmail.com>
> wrote:
> >
> > Thanks Saurabh for quick response.
> >
> > Did you mean to index recommended products as child documents ? and get
> > them back using block join to get the results ?
> >
> > If yes , difficulty is recommendations are very dynamic and they totally
> > depends on the user's session and how many products and type of the
> product
> > he has viewed. so Its really impossible to index them.
> >
> > Thanks,
> > Venkat.
> >
> > On Sat, Jul 20, 2019 at 9:07 PM Saurabh Sharma <
> saurabh.infoedge@gmail.com>
> > wrote:
> >
> > > Hi,
> > >
> > > You can add recommendations as child documents and use block join for
> > > retrieval. By adding as child it will easy for you to keep track of the
> > > recommendations.
> > >
> > > Thanks
> > > Saurabh
> > >
> > > On Sun, Jul 21, 2019, 8:16 AM Venkateswarlu Bommineni <
> bvr917@gmail.com>
> > > wrote:
> > >
> > > > Hello Team,
> > > >
> > > > Apologies , if you feel this question is silly and weird.
> > > >
> > > > Here is the scenario I am trying to achieve.
> > > >
> > > > 1) Customers come to PCAT (Product category/listing pages) [we hit
> Solr
> > > to
> > > > get the results]
> > > > 2) Customer selects a product and goes to product details page.
> > > > 3) When customer comes back to PCAT , we will hit third party
> service and
> > > > get some recommendations.
> > > > *problem : W*e want to add those recommendations right after the
> product
> > > > that customer viewed previously.
> > > >
> > > > Is there any way we can tell to Solr to add those products right
> after a
> > > > particular product while giving us the response ?
> > > >
> > > >
> > > > Thanks,
> > > > Venkat.
> > > >
> > >
>

Re: Add certain documents right after particular document

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
So, if the recommendations are dynamic and come from outside Solr, why
do you need Solr to do anything at this stage? Sounds like the
original result list is where Solr responsibility ends.

You are not exposing Solr directly to the UI (you should not), so
whatever your middleware is, can be coded any way you want.

Regards,
   Alex.

On Sun, 21 Jul 2019 at 00:17, Venkateswarlu Bommineni <bv...@gmail.com> wrote:
>
> Thanks Saurabh for quick response.
>
> Did you mean to index recommended products as child documents ? and get
> them back using block join to get the results ?
>
> If yes , difficulty is recommendations are very dynamic and they totally
> depends on the user's session and how many products and type of the product
> he has viewed. so Its really impossible to index them.
>
> Thanks,
> Venkat.
>
> On Sat, Jul 20, 2019 at 9:07 PM Saurabh Sharma <sa...@gmail.com>
> wrote:
>
> > Hi,
> >
> > You can add recommendations as child documents and use block join for
> > retrieval. By adding as child it will easy for you to keep track of the
> > recommendations.
> >
> > Thanks
> > Saurabh
> >
> > On Sun, Jul 21, 2019, 8:16 AM Venkateswarlu Bommineni <bv...@gmail.com>
> > wrote:
> >
> > > Hello Team,
> > >
> > > Apologies , if you feel this question is silly and weird.
> > >
> > > Here is the scenario I am trying to achieve.
> > >
> > > 1) Customers come to PCAT (Product category/listing pages) [we hit Solr
> > to
> > > get the results]
> > > 2) Customer selects a product and goes to product details page.
> > > 3) When customer comes back to PCAT , we will hit third party service and
> > > get some recommendations.
> > > *problem : W*e want to add those recommendations right after the product
> > > that customer viewed previously.
> > >
> > > Is there any way we can tell to Solr to add those products right after a
> > > particular product while giving us the response ?
> > >
> > >
> > > Thanks,
> > > Venkat.
> > >
> >

Re: Add certain documents right after particular document

Posted by Venkateswarlu Bommineni <bv...@gmail.com>.
Thanks Saurabh for quick response.

Did you mean to index recommended products as child documents ? and get
them back using block join to get the results ?

If yes , difficulty is recommendations are very dynamic and they totally
depends on the user's session and how many products and type of the product
he has viewed. so Its really impossible to index them.

Thanks,
Venkat.

On Sat, Jul 20, 2019 at 9:07 PM Saurabh Sharma <sa...@gmail.com>
wrote:

> Hi,
>
> You can add recommendations as child documents and use block join for
> retrieval. By adding as child it will easy for you to keep track of the
> recommendations.
>
> Thanks
> Saurabh
>
> On Sun, Jul 21, 2019, 8:16 AM Venkateswarlu Bommineni <bv...@gmail.com>
> wrote:
>
> > Hello Team,
> >
> > Apologies , if you feel this question is silly and weird.
> >
> > Here is the scenario I am trying to achieve.
> >
> > 1) Customers come to PCAT (Product category/listing pages) [we hit Solr
> to
> > get the results]
> > 2) Customer selects a product and goes to product details page.
> > 3) When customer comes back to PCAT , we will hit third party service and
> > get some recommendations.
> > *problem : W*e want to add those recommendations right after the product
> > that customer viewed previously.
> >
> > Is there any way we can tell to Solr to add those products right after a
> > particular product while giving us the response ?
> >
> >
> > Thanks,
> > Venkat.
> >
>

Re: Add certain documents right after particular document

Posted by Saurabh Sharma <sa...@gmail.com>.
Hi,

You can add recommendations as child documents and use block join for
retrieval. By adding as child it will easy for you to keep track of the
recommendations.

Thanks
Saurabh

On Sun, Jul 21, 2019, 8:16 AM Venkateswarlu Bommineni <bv...@gmail.com>
wrote:

> Hello Team,
>
> Apologies , if you feel this question is silly and weird.
>
> Here is the scenario I am trying to achieve.
>
> 1) Customers come to PCAT (Product category/listing pages) [we hit Solr to
> get the results]
> 2) Customer selects a product and goes to product details page.
> 3) When customer comes back to PCAT , we will hit third party service and
> get some recommendations.
> *problem : W*e want to add those recommendations right after the product
> that customer viewed previously.
>
> Is there any way we can tell to Solr to add those products right after a
> particular product while giving us the response ?
>
>
> Thanks,
> Venkat.
>