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?

user3615392
  • 91
  • 2
  • 5

1 Answers1

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
Tim Schimandle
  • 792
  • 11
  • 22