Restore support for looking up the capabilities of each field in the metamodel

Description

I.e. we need a way to know which predicates/sorts/projections/etc. are available for a given field. This will make it possible to implement something similar to jpamodelgen, where classes are generated at compile-time to represent the index metamodel and can be used in the Search DSL (something that's been requested before).

There was (limited) support for that in Search 5, through org.hibernate.search.metadata.FieldSettingsDescriptor#getType, org.hibernate.search.metadata.FieldSettingsDescriptor#getIndex, org.hibernate.search.metadata.FieldSettingsDescriptor#getStore.

An interesting way to implement this would be through a hasCapability(String) methods, where the string is the name of a given capability: match predicate, "within circle" predicate, "field value" sort, "distance" sort, ... Names would be exposed as constants in some BuiltinCapabilities class, and more importantly *each backend could define additional constants for its extended capabilities*. This would be very similar to what is described in for field configuration.

This ticket is a follow-up on HSEARCH-3589.

Environment

None

Assignee

Yoann Rodière

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Fix versions

Priority

Major
Configure