Query Suggestion Not Wokring in Liferay DXP

Vishnu S Kumar, modified 7 Years ago. Regular Member Posts: 131 Join Date: 7/28/17 Recent Posts

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.