Overriding an analyzer in the queryBuilder with an unknown analyzer should lead to a proper SearchException

Description

Currently we throw an NPE, see https://discourse.hibernate.org/t/cannot-find-the-second-analyzer-when-using/1043/3

This is a problem for two reasons:

  1. An NPE is not very explicit. If we fail, we should fail with a clear error message

  2. When using Elasticsearch, we probably shouldn't fail at all, since analyzers may be unknown to us (not defined in Hibernate Search), but still be present in the Elasticsearch index settings (added by the user directly)

Environment

None

Status

Assignee

Yoann Rodière

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Affects versions

Priority

Major
Configure