Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SpaceTypeDescriptor typeDescriptor = new SpaceTypeDescriptorBuilder("Comment")
.idProperty("id")
.idProperty("body")
.addQueryExtensionInfo("body", LuceneTextSearchQueryExtensionProvider.index()) // - (1)
.addQueryExtensionInfo("author.name", LuceneTextSearchQueryExtensionProvider.index()) // - (2)
.addQueryExtensionInfo("author.name", LuceneTextSearchQueryExtensionProvider.analyzer(KeywordAnalyzer.class)) // - (3)
.create();
space.getTypeManager().registerTypeDescriptor(typeDescriptor);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment