2

Is there a way in ElasticSearch wherein I can remove some the objects in the nested field array.

So I have a nested field and it returns array of objects. I need to remove some objects in the nested field.

Is it possible to do so in the query or I need to do that in my code

2 Answers 2

2

These extra nested documents are hidden; we can’t access them directly. To update, add, or remove a nested object, we have to reindex the whole document. It’s important to note that, the result returned by a search request is not the nested object alone; it is the whole document.

Nested Objects Elastic search

Sign up to request clarification or add additional context in comments.

Comments

0

As far as I know, In Elasticsearch you can't just remove part of a existing document. You should change the document (remove objects you don't need) and renew(rewrite) the document.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.