]
Yoann Rodière updated ISPN-12275:
---------------------------------
Git Pull Request:
Restore support for @Field(analyzer = ...) and @Field(normalizer =
...)
-----------------------------------------------------------------------
Key: ISPN-12275
URL:
https://issues.redhat.com/browse/ISPN-12275
Project: Infinispan
Issue Type: Task
Components: Embedded Querying
Reporter: Yoann Rodière
Priority: Major
Fix For: 12.0.0.Dev05
In Infinispan 11 (Hibernate Search 5.10/5.11), it used to be possible to assign an
analyzer or normalizer to a field with the following syntax:
{code}
@Field(analyzer = @Analyzer(definition = "myAnalyzer"))
private String myProperty;
@Field(analyzer = @Normalizer(definition = "myNormalizer"))
private String myProperty;
{code}
It seems that we made a mistake during the upgrade to Search 6, and support for this
syntax was removed. All that's left is the property-scoped syntax, where the analyzer
is defined next to the field:
{code}
@Field
@Analyzer(definition = "myAnalyzer")
private String myProperty;
{code}
If we want to provide at least partial backward compatibility in annotations, we should
restore support for the former syntax (and keep the latter).
For the record, analyzer assigned using the former syntax take precedence over analyzers
assigned using the latter.