Jose
Jose

Reputation: 113

Solr Join - getting data from different index

I'm working on a project where we have 2 million products and have 50 clients with different pricing scheme. Indexing 2M X 50 records is not an option at the moment. I have looked at solr join and cannot get it to work the way i want it too. I know it's like a self join so I'm kinda skeptical it would work but here it is anyway.

here is the sample schema

core0 - product core1 - client

So given a client id, i wanted to display all bags manufactured by Samsonite sorted by lowest price.

If there's a better way of approaching this, I'm open to redesigning exciting schema.

Thank you in advance.

Upvotes: 2

Views: 696

Answers (1)

Samuele Mattiuzzo
Samuele Mattiuzzo

Reputation: 11038

Solr is not a relational database. You should give a look at the sharding feature and split your indexes. Also, you could write your custom plugins to elaborate the price data based on client's id/name/whatever at index time (BAD you'll still get a product replicated for each client).

How we do (so you can get an example):

  • clients are handled by sqlite
  • products are stored in solr with their "base" price
  • each client has a "pricing rule" applied via custom query handler when they interrogate the db (it's just a value modifier)

Upvotes: 1

Related Questions