@Column(nullable = false, length = 50)
@Fields({
@Field(name = "firstName", index = Index.YES, analyze = Analyze.YES, analyzer = @Analyzer(definition = "nameAnalyzer")),
@Field(name = "dummyFieldToAddQueryAnalyzer", index = Index.YES, analyze = Analyze.YES, analyzer = @Analyzer(definition = "nameAnalyzer_query"), bridge = @FieldBridge(impl = DummyStringBridge.class))
})
private String firstName;
Now I have a firstName
field for searching, indexing and analysed, but now I want to make this field sortable, say sort by first name, I am not able to add @SortableField
, because sort fields must not be analyzed, right?
How can I do that? any other tricks?