Out of Date
Details
Assignee
Yoann RodièreYoann RodièreReporter
Smallufo HuangSmallufo HuangComponents
Priority
Major
Details
Details
Assignee
Yoann Rodière
Yoann RodièreReporter
Smallufo Huang
Smallufo HuangComponents
Priority
Created October 19, 2010 at 4:09 PM
Updated May 11, 2020 at 7:44 AM
Resolved May 11, 2020 at 7:43 AM
Today , I found I cannot annotate more than one @AnalyzerDiscriminator in a class.
I feel it is very not intuitive. And it will make the Discriminator implementation more complicated. Because Discriminator will need to more judge field to decide correct analyzer , especially when the two fields are of different types.
Sample1.java
Sample2.java
See the two classes for example.
I cannot add two @AnalyzerDiscriminator in one class , and it throws "Multiple AnalyzerDiscriminator defined in the same class hierarchy" Exception.
So I have to combine LanguageDiscriminator and AnotherDiscriminator into one and use it in the 1st example. And judge Analyzer by field name : 'title' for language analyzer , and 'content' for another analyzer.
but I cannot re-use the 'CombinedDiscriminator' to the 2nd example , because in 2nd example , the 'title' should apply AnotherDiscriminator , not LanguageDiscriminator in 1st example.
So I suggest , a class should be able to apply different Discriminators to different fields. And the Discriminator's methods should be :
It will be more flexible.