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

**URL:** <https://discuss.elastic.co/t/depending-on-the-restart-of-the-index-server-there-are-cases-in-which-the-search-is-different-why/286792>\
**Category:** Elasticsearch\
**Created:** [October 15, 2021, 5:05am UTC](https://discuss.elastic.co/t/depending-on-the-restart-of-the-index-server-there-are-cases-in-which-the-search-is-different-why/286792 "2021-10-15T05:05:50Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeongin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeongin/32/50366_2.png) [@jeongin](https://discuss.elastic.co/u/jeongin)\
**Post date:** [October 15, 2021, 5:05am UTC](https://discuss.elastic.co/t/depending-on-the-restart-of-the-index-server-there-are-cases-in-which-the-search-is-different-why/286792/1 "2021-10-15T05:05:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jeongin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeongin/32/50366_2.png) [@jeongin](https://discuss.elastic.co/u/jeongin)\
**Post date:** [October 15, 2021, 5:07am UTC](https://discuss.elastic.co/t/depending-on-the-restart-of-the-index-server-there-are-cases-in-which-the-search-is-different-why/286792/2 "2021-10-15T05:07:12Z")

</div>

es version is 7.11.1

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 18, 2021, 12:54am UTC](https://discuss.elastic.co/t/depending-on-the-restart-of-the-index-server-there-are-cases-in-which-the-search-is-different-why/286792/3 "2021-10-18T00:54:21Z")

</div>

Welcome to our community! 😃

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

---

<div class="post-metadata">

**Author:** ![jeongin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeongin/32/50366_2.png) [@jeongin](https://discuss.elastic.co/u/jeongin)\
**Post date:** [October 18, 2021, 4:10am UTC](https://discuss.elastic.co/t/depending-on-the-restart-of-the-index-server-there-are-cases-in-which-the-search-is-different-why/286792/4 "2021-10-18T04:10:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 18, 2021, 4:12am UTC](https://discuss.elastic.co/t/depending-on-the-restart-of-the-index-server-there-are-cases-in-which-the-search-is-different-why/286792/5 "2021-10-18T04:12:15Z")

</div>

> [@jeongin](#):
>
> - Restart.
> - Perform an index.
> - Check the term with '\_termvectors' api.
> - Term 'xxxx' exists.
> - Check the term with '\_explain' api.
> - Receive normal messages.

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

---

<div class="post-metadata">

**Author:** ![jeongin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeongin/32/50366_2.png) [@jeongin](https://discuss.elastic.co/u/jeongin)\
**Post date:** [October 18, 2021, 8:12am UTC](https://discuss.elastic.co/t/depending-on-the-restart-of-the-index-server-there-are-cases-in-which-the-search-is-different-why/286792/6 "2021-10-18T08:12:20Z")

</div>

@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](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](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](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](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": [  
> { ......}

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 18, 2021, 8:20am UTC](https://discuss.elastic.co/t/depending-on-the-restart-of-the-index-server-there-are-cases-in-which-the-search-is-different-why/286792/7 "2021-10-18T08:20:40Z")

</div>

> [@jeongin](#):
>
> Perform an index.

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

---

<div class="post-metadata">

**Author:** ![jeongin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeongin/32/50366_2.png) [@jeongin](https://discuss.elastic.co/u/jeongin)\
**Post date:** [October 18, 2021, 8:37am UTC](https://discuss.elastic.co/t/depending-on-the-restart-of-the-index-server-there-are-cases-in-which-the-search-is-different-why/286792/8 "2021-10-18T08:37:22Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 15, 2021, 8:37am UTC](https://discuss.elastic.co/t/depending-on-the-restart-of-the-index-server-there-are-cases-in-which-the-search-is-different-why/286792/9 "2021-11-15T08:37:41Z")

</div>

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