You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Avi Steiner <as...@varonis.com.INVALID> on 2021/05/04 09:34:00 UTC

Solr - Multiple Collections with facets

This is a question related to Solr (8.8.x) with 2 types of data on a distributed environment. One type that rarely changes. Another type that is frequently changes.
I'm having a Books collections with the following schema:
Books
- Title <string> [Stored, indexed]
- Author <Multi-values string> [Stored, indexed]
- ISBN <int> [Stored, indexed]
- Content [indexed]
I want to add a new field to the schema called Tags (Multi-values string) that will be frequently change.
Tags will be used as a kind of ENUM (e.g. Best seller, Recommended etc.).
The problems is that I don't have the "Content" field stored (impossible due to sizing limitations).
Therefore, the document cannot be updated (there is no partial update in Solr).
I thought about creating a new collection. Suppose I have the next two collections:
Books
- Title <string> [Stored, indexed]
- Author <Multi-values string> [Stored, indexed]
- ISBN <int> [Stored, indexed]
- Content [indexed]
Tags
- ISBN <int> [Stored, indexed]
- Tags <Multi-values string> [Stored, indexed]
I can make a JOIN query using the ISBN field.
However, I still want to be able to query facets from both collections.
I there anyway I can achieve it?
Another option I had is to add Tags fields as a nested (child) document.
By this approach, whatever I want can succeed, but I'm afarid it will require a massive update flow.
It will be much easier for me to import the entier Tags collection with ETL operation.
The Books collection hardly changes and it will force me to load into memory a lot of segments that would not be required if the Tags data was in a separate collection.
Is there another approach I missed and can help me?


________________________________
This email and any attachments thereto may contain private, confidential, and privileged material for the sole use of the intended recipient. Any review, copying, or distribution of this email (or any attachments thereto) by others is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently delete the original and any copies of this email and any attachments thereto.