5

When indexing the entity(document) the default behavior is to index all the fields of the entity. By default source is enabled and store is disabled to all fields. But If I want to index some of the fields only instead of index all the fields, As I understood I have to disable the source and explicitly mark the fields as store yes.

Can I disable the source for document/entity using spring data elasticsearch? Does it support by annotations?

1 Answer 1

0

If you just want to prevent a field from being indexed you can just add a field annotation like this:

@Field(store = false)
private YourObject yourObject
Sign up to request clarification or add additional context in comments.

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.