Depending on the restart of the index server, there are cases in which the search is different. Why?

We have a separate boxtype index server.
Two cases will be described.

First

  • Restart.
  • Perform an index.
  • Check the term with '_termvectors' api.
  • Term 'xxxx' exists.
  • Check the term with '_explain' api.
  • Receive 'no matching term' message response.

Second

  • Restart.
  • Perform an index.
  • Check the term with '_termvectors' api.
  • Term 'xxxx' exists.
  • Check the term with '_explain' api.
  • Receive normal messages.

Both the first and second results above just restarted the index server. Why are the results different? I don't know the cause. Our conclusion is that there are cases where rebooting is normal and cases where it is abnormal.

es version is 7.11.1

Welcome to our community! :smiley:

I think we'd need to see some sample commands of what you are running to be able to provide more insight here.

@warkolm Hello. Thanks for posting the answer.
What should I check? Thank you for providing specific items and confirmation commands.

You'd need to provide the commands and response/output you are getting with each of these steps to show the difference,

@warkolm
The first is abnormal, the second is normal
This command is used to judge abnormal/normal. thank you.

First

Restart.
Perform an index.
Check the term with '_termvectors' api.

=>get http://xxxxxxxxxxxxxx/_doc/67828/_termvectors?fields=query&term_statistics=true&realtime=true

Term 'xxxx' exists.

=> 찜질방: {
doc_freq: 16,
ttf: 16,
term_freq: 1,
tokens: [
{
position: 30,
start_offset: 77,
end_offset: 80
}
]
},

Check the term with '_explain' api.

=>post http://xxxxxxxxxxxxxxxxxxxxxxxx/_explain/67828
{
"query": {
"term": {
"query": {
"value": "찜질방",
"boost": 1.0
}
}
}
}

Receive 'no matching term' message response.

=>{
"_index": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"_type": "_doc",
"_id": "67828",
"matched": false,
"explanation": {
"value": 0.0,
"description": "no matching term",
"details":
}
}

Second

Restart.
Perform an index.
Check the term with '_termvectors' api.

=> http://xxxxxxxxxxxxxx/_doc/67828/_termvectors?fields=query&term_statistics=true&realtime=true

Term 'xxxx' exists.

=> 찜질방: {
doc_freq: 16,
ttf: 16,
term_freq: 1,
tokens: [
{
position: 30,
start_offset: 77,
end_offset: 80
}
]
},

Check the term with '_explain' api.

=>post http://xxxxxxxxxxxxxxxxxxxxxxxx/_explain/67828
{
"query": {
"term": {
"query": {
"value": "찜질방",
"boost": 1.0
}
}
}
}

Receive normal messages.

=>{
"_index": "xxxxxxxxx",
"_type": "_doc",
"_id": "67828",
"matched": true,
"explanation": {
"value": 8.704652,
"description": "weight(query:찜질방 in 10255) [PerFieldSimilarity], result of:",
"details": [
{ ......}

What are you indexing? We need to see a sample.

@warkolm
It doesn't seem to have anything to do with index data, do you need sample data? If it's related to index data, I think the issue should have continued regardless of whether or not it was restarted.
If you describe in detail how you approach the issue and want to check it, we will provide you with the corresponding data. thank you.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.