Description
Because of LUCENE-5833 we have to do merge the :suggest field values in one single valued field, however in case there's only one text value for suggestions (e.g. a Lucene property index on jcr:primaryType) the value is not stored as LuceneIndexEditor uses the previously set field newPropertyField(FieldNames.SUGGEST, value, true, false) instead of FieldFactory.newSuggestField(f.stringValue()) causing the building of the suggester dictionary to fail with:
org.apache.jackrabbit.oak.plugins.index.lucene.util.SuggestHelper could not update the suggester java.lang.IllegalArgumentException: need at least one suggestion at org.apache.lucene.search.suggest.analyzing.FreeTextSuggester.build(FreeTextSuggester.java:338) at org.apache.lucene.search.suggest.analyzing.FreeTextSuggester.build(FreeTextSuggester.java:278) at org.apache.lucene.search.suggest.Lookup.build(Lookup.java:165) at org.apache.jackrabbit.oak.plugins.index.lucene.util.SuggestHelper.updateSuggester(SuggestHelper.java:64) at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditorContext.updateSuggester(LuceneIndexEditorContext.java:188)