Discuss unique ProjectionConstants API

Description

We're currently exposing both a org.hibernate.search.backend.elasticsearch.ProjectionConstants and a org.hibernate.search.engine.ProjectionConstants.

It's not nice to have two classes in the public API which have the same name, as the package difference isn't very clear when reading code.

Should we simply expose the Elasticsearch specific projection constants in the parent class?

Should we make these options somehow better errorprone, maybe via typesafety, to prevent using a constant which isn't accepted?

At the very least we should verify that the non-Elasticsearch backend recognises the constants currently defined on org.hibernate.search.backend.elasticsearch.ProjectionConstants and warns about a possible mistake. I believe it would currently attempt to load a stored field having the name of the constant value.

Environment

None

Status

Assignee

Gunnar Morling

Reporter

Sanne Grinovero

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Priority

Blocker