how to filter data from elasticsearch -


i have create several indexes in elasticsearch. result of http://localhost:9200/_cat/indices?v indicate follows.

health status index                                        pri rep docs.count docs.deleted store.size pri.store.size  yellow open   idx_post:user:5881bc8eb46a870d958d007a         5   1          6            0     31.3kb         31.3kb  yellow open   idx_usr                                        5   1          2            0     14.8kb         14.8kb  yellow open   idx_post:group:587dc2b57a8bee13bdab6592        5   1          1            0      6.1kb          6.1kb 

i new elasticsearch , tried filter data using index idx_usr.

http://localhost:9200/idx_usr/_search?pretty=1 

it working fine , returns expected values. when trying grab data using index idx_post returns error saying index not found.

http://localhost:9200/idx_post/_search?pretty=1 

this gives result:

{   "error" : "indexmissingexception[[idx_post] missing]",   "status" : 404 } 

if can identify reason. thankful.

update::

this how create index. assume there object call data. , using es client call this.esclient

    var _esdata = {         index: "idx_post:group"+data.group_id;         type:'posts',         id:data.post_id.tostring()      };      _esdata['body'] = data;     this.esclient.index(_esdata, function (error, response) {         if(error)             console.log(error);         callback(response);     }); 

because index not exists

{   "error" : "indexmissingexception[[idx_post] missing]",   "status" : 404 } 

you try search in idx_post while _cat returns name idx_post:user:5881bc8eb46a870d958d007a , idx_post:group:587dc2b57a8bee13bdab6592


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -