ElasticSearch: Document exists but not found -


when insert new documents index, don't them... here query:

{ query:     { bool:        { must:           [ { match: { name: 'here name' } },            { parent_id: { type: 'type', id: 'parentid' } } ] } } } 

just before, have add lot ( around 10 000 documents ), , can documents, , not others, weird...

sometimes, don't document when query dev tools, seems work better after post /_refresh, still don't have of them later

here how build index:

put /myindex {    "settings":{       "index":{          "number_of_shards":1,          "refresh_interval" : "-1",          "number_of_replicas" : 0       }    },    "mappings":{ // mapping here } } 

thank much.

in settings have "refresh_interval" : "-1", means automatic refreshes turned off. in case every time want refresh index (make documents visible search), need call post /myindex/_refresh.

your refresh_interval value must > 0 documents automatically refreshed. e.g.

put /myindex/_settings { "refresh_interval": "1s" }  

refresh automatically every second.


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -