Choose what to be indexed

Hi,

I have start now with elastic and was searching but with no results on the web..

I have the following payload

{
"name": "John Doe",
"email": "johndoe@company.com"
"phone": "55115552891365"
"content": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla a nibh quam. Vivamus blandit sollicitudin hendrerit. Cras maximus ipsum quis quam ullamcorper, quis varius urna convallis. Vivamus ut leo quis enim blandit pretium eget ac eros. Maecenas placerat velit a consectetur viverra. Donec interdum tellus sapien, vitae elementum ligula malesuada ac. Nunc lobortis tortor ac magna gravida, vitae elementum purus vulputate. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam facilisis vulputate est id egestas. Proin non fringilla ligula. Donec vitae erat facilisis, elementum odio nec, vulputate purus. Nam eros orci, volutpat in dui id, semper fermentum erat. Fusce velit enim, dictum vitae finibus ut, eleifend a libero. In eu ipsum odio.
...
The size of this payload can grow three times the text above
"
}

The question is:
It is possible to index only name email and phone, and those fields be the only ones to be available for search, but when i retrieve the document, get the content?

Explaining this behavior:
We have a chatbot application, and we need a searchable history, but we do not need to search into full content, only name, email and phone, but we DO need the content on the documents returned from ES.

It is possible?

Thanks in advance

Yes it is.
You can disable a field: https://www.elastic.co/guide/en/elasticsearch/reference/current/enabled.html

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