Mailing List Archive

Lucene Suggester APIs question
Hi,

I have a question about lucene suggester APIs. If I build multiple FSTs
using a suggester, is there a way to merge two generated FSTs?

--

Nitish Jain
Re: Lucene Suggester APIs question [ In reply to ]
Yes, you need to build a third FST. You can build a merging iterator
that will combine two or more FST traversal streams so that they're in
order and then build a merged FST directly, with no extra sorting cost.

https://lucene.apache.org/core/7_1_0/core/org/apache/lucene/util/fst/Builder.html#add-org.apache.lucene.util.IntsRef-T-

This should be fast as fst construction is linear with data size (if
it's sorted).

Dawid


D.

On Mon, Aug 15, 2022 at 4:36 PM Nitish Jain <nitish.jain2009@gmail.com> wrote:
>
> Hi,
>
> I have a question about lucene suggester APIs. If I build multiple FSTs
> using a suggester, is there a way to merge two generated FSTs?
>
> --
>
> Nitish Jain

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org