I have a shop where the vast majority of the items indexed are not available anymore and should not be shown on autocomplete requests, but should be available to search.
At first I thought about using the context suggester to filter out the unwanted results, but I got worried about the wasted performance of indexing so many hidden items to the in memory FST when most of them will always be filtered out (roughly 4000 out of 400.000 items should appear on autocompletion). It seems like such a waste of memory.
I tried having an empty string as the completion field for the unwanted items but I got an
MapperParsingException[no object mapping found for null value....
Is there any way to skip adding some items to the completion FST at index time ?