]
Ulrich Vachon commented on HSEARCH-267:
---------------------------------------
Of course, i will join an example as soon as possible.
Inheritance of annotations and analyzer
---------------------------------------
Key: HSEARCH-267
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-267
Project: Hibernate Search
Issue Type: Bug
Components: analyzer
Affects Versions: 3.0.1.GA
Reporter: Ulrich Vachon
Assignee: Hardy Ferentschik
Fix For: 3.1.0.Beta2
I have this hierarchical classes : Class0 extends Class1 extends Class2 extends Class 3
(see code example).
When I index my entity (Class0), HS don't use my CompoundMetaphoneAnalyzer to index
my property "name" but the Hibernate raw value (ie: Procaïne). If I add the
@Indexed annotation and @Analyzer to class Class2, HS use my CompoundMetaphoneAnalyzer and
my index contain the value (ie: procaine).
// class 3
public abstract class Class3 {
private Integer id;
@DocumentId
public Integer getId() {
return id;
}
}
// class 2
public abstract class Class2 extends Class3 {
protected String name;
@Fields( {@Field(name = IndexedEntity.NAME, index = Index.TOKENIZED, store =
Store.YES), @Field(name = IndexedEntity.METAPHONE, index = Index.TOKENIZED, store =
Store.YES)})
public String getName() {
return name;
}
}
// class 1
public abstract class Class1 extends Class2 {
// nothing...
}
// class 0
@Indexed
@Analyzer(impl = CompoundMetaphoneAnalyzer.class)
public class Class0 extends Class1 {
// code...
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: