Newbie here. This is probably straightforward, but I wanted to get
best-practices recommendations if applicable.
My main ES use and query case is to search for a kind of Event. All Events
are associated with (i.e. contain) a Country object. Besides querying for
other kinds of Event data, queries can contain country-related data (e.g.
name, location, continent, etc.). Since countries are a finite set and the
country data is fairly large, I'd prefer not to duplicate country data
across Event documents. What's the best way to handle this situation?
Best thing I can think of is to 1) create a separate index with the country
data, then 2) run the user query against the country index 3) Pick off the
high match(es) if any and 4) issue a new query against the Event index
using something like the country abbreviation (from the high match) which
would be an Event field. This seems like a lot of work per query. Is there
a better solution?
Newbie here. This is probably straightforward, but I wanted to get
best-practices recommendations if applicable.
My main ES use and query case is to search for a kind of Event. All Events
are associated with (i.e. contain) a Country object. Besides querying for
other kinds of Event data, queries can contain country-related data (e.g.
name, location, continent, etc.). Since countries are a finite set and the
country data is fairly large, I'd prefer not to duplicate country data
across Event documents. What's the best way to handle this situation?
Best thing I can think of is to 1) create a separate index with the
country data, then 2) run the user query against the country index 3) Pick
off the high match(es) if any and 4) issue a new query against the Event
index using something like the country abbreviation (from the high match)
which would be an Event field. This seems like a lot of work per query. Is
there a better solution?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.