I have some "refresh" problem with ElasticSearch v6.2.1.
Given an index "my_index" and a type "my_type", this is the scenario :
Step 1: Launch query that returns the 50 first documents where some fields (id, address, information) match with term parameter (e.g PARIS)
The result:
DOC1,
DOC2,
DOC3,
DOC4,
...
DOC50
Step 2: Update DOC1 phoneNumber field with query (/my_index/my_type/DOC1/_update
)
Step 3: Relaunch step 1 query.
The result:
DOC2,
DOC3,
DOC4,
DOC5,
...
DOC1 (29th place),
....
DOC50
As we can see, my modified document is moved to the 29th place.
My question is why my document does not take the same place, knowing that phoneNumber is not considered in my search. Since the DOC1 is the most pertinent result.
I tried to refresh the index (/my_index/_refresh
), to launch the refresh after update with "?refresh
" (even if it's by default), to set "refresh_interval
" to 1 second.
I tried to reduce number_of_replicas
to 0
and number_of_shards
to 1
with no result.
Any idea about this behavior, did I forget something?
The question is also asked in stackoverflow