Hi,
We are indexing two entities: Staff and RegistryReference. Only one index has sort fields declared - registry reference. They are declared as:
{code} @Indexed class Staff { ... }
@Indexed class RegistryReference { @Field(name = "sort-date", index = Index.NO, analyze = Analyze.NO) @SortableField(forField = "sort-date") @DateBridge(resolution = Resolution.MILLISECOND) @Transient @SuppressWarnings("unused") private Date getIndexSortDate() { // Fetches a date object return ...; }
@Fields({ @Field(name = "unstructured-address-ngram", analyzer = @Analyzer(definition = "ngram")), @Field(name = "unstructured-address-plain", analyzer = @Analyzer(definition = "plain")), @Field(name = "sort-address", index = Index.NO, analyze = Analyze.NO) }) @SortableField(forField = "sort-address") private String unstructuredAddressDescription;
} {code}
No problems there - indexing and searching seems to work fine. However, whenever I create a search for registry references, I get this warning in the log:
{code} 2018-12-18T10:28:34,468 WARN [http-apr-8080-exec-10] org.hibernate.search.reader.impl.ManagedMultiReader.getIndexesToBeUninverted(ManagedMultiReader.java:144) - HSEARCH000289: Requested sort field(s) addressBean. sort-address, sort-date are not configured for entity type ca.statcan.icos.model.admin.Staff mapped to index ca.statcan.icos.model.admin.Staff, thus an uninverting reader must be created. You should declare the missing sort fields using @SortableField. {code}
Staff does not have those fields declared because... they aren't declared. But, I'm not searching Staff... so why do the sorts defined in my search for registry references trigger a warning for staff?
Thanks! |
|