java - Unable to get data from Elasticsearch -


i'am working on couchbase , elasticsearch spring data. have replication started couchbase elasticsearch. can save data in couchbase using spring data, data saved , gets replicated elasticsearch. while trying read elasticsearch shows null, id values show in result. when save directly in elasticsearch it's possible read correctly. guess it's because of structural change data. how can solve this?

data in elasticsearch after replication:

{  "_index": "streams", "_type": "couchbasedocument", "_id": "e8c7999c-67c8-47a4-b235-726d89102f83", "_score": 1, "_source": {     "meta": {         "id": "e8c7999c-67c8-47a4-b235-726d89102f83",         "rev": "3-000007c43e1293830000000000000000",         "expiration": 0,         "flags": 0     },     "doc": {         "createdon": "20141201183646786",         "activityid": "c3c0dc11-16b5-479b-80c5-93d2ce34d77d",         "_class": "com.netspective.streams.model.activity",         "documenttype": "activity",         "objectid": "useragent_1",         "subjectid": "{"actionid":"111"}",         "actionid": "2",         "updatedon": "20141201183646786",         "deletestatus": false     } }  } 

data in elasticsearch inserted directly:

{  "_index": "streams", "_type": "couchbasedocument", "_id": "45ebb326-a33e-43f2-9fd7-60953cb14772", "_score": 1, "_source": {     "id": "45ebb326-a33e-43f2-9fd7-60953cb14772",     "activityid": "56d291bc-eacd-4942-b26d-08025eec0ab1",     "subjectid": "{"actionid":"123"}",     "objectid": "useragent_1",     "documenttype": "activity",     "createdon": "20141202113523979",     "updatedon": "20141202113523979",     "deleteststus": false,     "action": "2" }  } 

you need update elasticsearch mappings if have changed structure of data.

take @ indexing issues section of elasticsearch plugin documentation, describes how address this.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -