Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Query Suggestion Not Wokring in Liferay DXP
I configured the Boolean Search Query Like the following inside the indexpostprocessor of the journal article.
fullQuery.getQueryConfig().setQueryIndexingThreshold(1);
fullQuery.getQueryConfig().setQueryIndexingEnabled(true);
fullQuery.getQueryConfig().setQuerySuggestionEnabled(true);
fullQuery.getQueryConfig().setQuerySuggestionScoresThreshold(50);
I searched keyword "test one" a couple of times , and got 10 results. Next time when I searched "test two" only 2 results showed but not query suggestions.
Indexer<?> indexer =
IndexerRegistryUtil.getIndexer(JournalArticle.class);
hits = indexer.search(searchContext);
HitsProcessorRegistryUtil.process(searchContext, hits);
String a[] = hits.getQuerySuggestions(); ==> empty array
Please help me to resolve the issue.Thanks in advance.