let me try to answer (inlining)"
On Mon, Nov 29, 2010 at 12:08 PM, Gautam Mr email@example.com wrote:
Would appreciate if any of you can share your experience / thoughts on
- REST Api vs Java api - Have read that Java api is much faster as it
works at a lower level protocol. Do you guys have any comparison?
It depends on what exactly you measure and also on your use case. First, as
of writing the REST API can be used via
Memcached protocol should be faster then HTTP (and has also some
minor downsides) but it depends on your client implementation (e.g. client
can be using slow implementation of HTTP client module under the hood). When
using Java API there different
TransportClient or NodeClient. TransportClient is slower then NodeClient;
however, NodeClient joins directly the cluster while TransportCient does
not. Both (Java) clients use optimized binary protocol so they are faster
then HTTP and Memcached protocols.
- What approach do you suggest for the below mentioned use case:
I plan to index a stream of short messages (like Tweets) into ES.
Now I don't want to keep say more than a month old data. How do I flush it?
You can index your data by weeks (days, hours, ... etc, you name it) and
have each data bucket indexed into a specific index. You will end up with
more indices like: twitter-ww31, twitter-ww32, twitter-ww33 (...). Then you
can search across more
drop old indices (see index
Also note that each index can have
this could help you to just search in one "index alias" while this
span to multiple indices automatically.
- If I create 3 index files say a, b, c. How do I tell ES to search on all
See index aliaseshttp://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/indices/aliases/
- ES seems to have good shard support. Is there a way to control these
shards on capacity?
You mean if shards are of the same size? As far as I understand the data is
split among shards evenly by edfault. So if you have 10MB of data and you
have 5 shards, then each shard would have around 2MB. However, there has
been implemented a new
in 0.13.0 which gives you a chance to control shard routing (see this
ticket for details:
Thanks in advance for your help.