Different results with/without preference=_primary_first/_replica_first using count API

2015-01-18 Thread Xiaoting Ye
Hi, I'm bulk indexing massive data however when I check the status, I found some interesting results: When I called: curl -XGET 'http://localhost:9200/my_index/my_type/_count?pretty' -d '{"query" : { "filtered": {"filter" : {"exists" : {"field": "visibility"}}' It returned: { "count" :

Re: performance getting even worse after optimization

2015-01-08 Thread Xiaoting Ye
uary 2015 at 20:40, Xiaoting Ye wrote: > >> Hi, >> >> I just did an _optimize operation on a cluster (10 data nodes, roughly >> 350,000,000 docs in total). This a cluster only has one index. >> >> However, the performance gets even worse: the response time

performance getting even worse after optimization

2015-01-08 Thread Xiaoting Ye
Hi, I just did an _optimize operation on a cluster (10 data nodes, roughly 350,000,000 docs in total). This a cluster only has one index. However, the performance gets even worse: the response time doubled or even tripled. Any hint on this? Thanks! -- You received this message because yo

how to return the count of unique documents by using elasticsearch aggregation

2014-12-18 Thread Xiaoting Ye
Hi, Is there a way to return the count of the unique documents by using aggregation? My use case is pretty simple: In my data model I have an array of locations : { ..., "locations" : [ { "city" : "new york", "state" : "ny" }, { "city" : "woodbury", "s