The follow example is a search problem that I'm trying to solve. This
is example is more of an analogy but it should get the point across.
I have a master index of different beer selections. It has fields like
the name of the beer, "Torpedo Extra IPA," the brewery, "Sierra
Nevada," the abv, the color, the style, an official description, and
more. Some breweries will change the details of some of these beers
from year to year so this information would preferably live in only
Next, each user has their own index of beer. In this index the user
may include different details for each of beer fields. Most notably
would be description. The user will very likely have their own
specific notes for description.
Let's take the Torpedo Extra IPA example. The master index has the
name: "Torpedo Extra IPA",
brewery: "Sierra Nevada",
description: "Sierra Nevada Torpedo Ale is a big American IPA;
bold, assertive and full of flavor and aromas highlighting the complex
citrus, pine and herbal character of whole-cone American hops."
Let's say the user document is as follows ...
description: "Hoppy, floral orange notes with a malty character
balanced by a sharp spicy bitter hop bite. Contains Citra hops."
The easiest way to describe how I want the results is likely the wrong
way of thinking about the problem, but it's very clear to understand.
I would like to basically search on description, joining on _id,
showing the data from the master record in the results. But it's a
little more complicated than that. I actually want the "joined"
results to appear first (let's say on average there are 5-10 of
these), results only in the user index next, followed by results from
only the master index.
I've thought of a few different way of doing this but I'd like to hear
some other hopefully better ideas. I'm also willing to listen to
"you're making it too complicated do this instead."