I am planning to use elasticsearch for my website and I need to index 3
different types of entities.
It's something like: users/tweets/tags
Would it be better to create 3 different indexes or create 1 index with 3
types?
I'm going to need the ability to search across users/tweet and tags at the
same time.
I know it's possible to use multi search if I have 3 indexes or if if I
have 1 index and 3 types, you just specify the types in the query.
The only issue I'm seeing with 3 types is that I would like to be able to
get 3 results of each entity.
Is this possible? what will be the best practice?
My guess would be that you could have 1 index, and have the users be
parents of tweets (see parent/child relationships / routing), then have
tags be a single array property within each tweet.
You'll be able to do searches for tweets by user efficiently and facet on
tags.
There have got to be other designs for this, though.
Hey,
I am planning to use elasticsearch for my website and I need to index 3
different types of entities. It's something like: users/tweets/tags Would
it be better to create 3 different indexes or create 1 index with 3 types?
I'm going to need the ability to search across users/tweet and tags at the
same time. I know it's possible to use multi search if I have 3 indexes or
if if I have 1 index and 3 types, you just specify the types in the query.
The only issue I'm seeing with 3 types is that I would like to be able to
get 3 results of each entity. Is this possible? what will be the best
practice?
Thanks!
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Types essentially give you the ability to create different documents
schemas. Ultimately, all the types reside in the same Lucene index.
If your volume changes dramatically between types, which I assume is your
case, then I would suggest different indices. The number of tweets should
be orders of magnitude higher than the number of users. With different
indices, you can control the amount of shards and replicas. The smaller
indices probably do not need to be sharded as much. Having different types
in the same index removes this flexibility. YMMV, create lots of tests.
Cheers,
Ivan
On Mon, Oct 7, 2013 at 6:29 AM, itay yahimovitz itay1336@gmail.com wrote:
Hey,
I am planning to use elasticsearch for my website and I need to index 3
different types of entities.
It's something like: users/tweets/tags
Would it be better to create 3 different indexes or create 1 index with 3
types?
I'm going to need the ability to search across users/tweet and tags at the
same time.
I know it's possible to use multi search if I have 3 indexes or if if I
have 1 index and 3 types, you just specify the types in the query.
The only issue I'm seeing with 3 types is that I would like to be able to
get 3 results of each entity.
Is this possible? what will be the best practice?
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.