Annotation Interface SearchExclude
When a property is ignored, the document can't be matched using this property. More specifically, the property is
ignored by MatchConstraint, LookAheadConstraint, ContainsConstraint, and
QueryConstraint. I.e. if the property is also marked with @Facet, it can still be matched using
a FacetConstraint. Matching using BetweenConstraint or ExistsConstraint is also not
affected.
When this annotation is present on a type, all properties of the class will be ignored when indexing, unless they are
individually annotated with SearchExclude(false) or SearchInclude.
Note that the property is not lost when the document is serialized or deserialized. If that is the intention, make
the property transient instead, e.g. using an annotation like Transient or
JsonIgnore.
When placed on a type, @SearchExclude also applies to any nested types declared within that type. Use
SearchInclude to override.
Subclasses can re-enable indexing using SearchInclude or by specifying a value() of false on
the overridden property or class.
The standard Jackson inverter records exclusions per concrete field path, independently of identical values in
other fields. Readers without this support still retain the complete document body. To correct previously indexed
documents, upgrade both the writing SDK and the Runtime, then reindex the typed values; an old document's summary
alone cannot reconstruct which fields were excluded. A custom inverter or custom summarizer owns its own indexing
semantics.
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanOptional argument that defines whether this annotation is active (true) or not (false).
-
Element Details
-
value
boolean valueOptional argument that defines whether this annotation is active (true) or not (false).- Default:
true
-