Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Getting old results in search after index refresh

Lorenzo Sfarra Oct 02, 2018 11:58AM +03

I have some problems understanding why I am getting old results for search operations.
I am using the refresh?wait_for param to force a refresh when updating and block other operations until that moment (I know the performance implications):

curl -XPUT https://site:<my_code_here>@gloin-eu-west-1.searchly.com/clients/client/<client_id_here>?refresh=wait_for -d '{ "firstName":"Alessandro", "lastName": "Del Piero", "phoneNumber": "393401122999" }'

output:
{"_index":"clients","_type":"client","_id":"<client_id_here>","_version":19,"result":"updated","_shards":{"total":2,"successful":2,"failed":0},"_seq_no":41,"_primary_term":1}

Now, the GET by ID works fine:
curl -XGET https://site:<my_code_here>@gloin-eu-west-1.searchly.com/clients/client/<client_id_here>

output:
{"_index":"clients","_type":"client","_id":"<client_id_here>","_version":19,"found":true,"_source":{ "firstName":"Alessandro", "lastName": "Del Piero", "phoneNumber": "393401122999" }}

The problem is in the research.
I don't get any reply:

curl -X GET "https://site:<my_code_here>@gloin-eu-west-1.searchly.com/clients/client/_search?pretty&q=phoneNumber:393401122999"

output:
{"took":0,"timed_out":false,"_shards":{"total":1,"successful":1,"skipped":0,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}

If I search for "firstName:Alessandro" I can see the result, but with the old value of phoneNumber.

Any hints? Thanks!
Lorenzo

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)
support@searchly.com
http://assets3.desk.com/
false
searchboxio
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete