Re: Lucene Suggester APIs question
Dawid Weiss <[email protected]> Sat, 20 Aug 2022 18:10:04 +0200
| Newsgroups | gmane.text.xml.axis.user,gmane.comp.jakarta.lucene.solr.user |
|---|---|
| Message-ID | <CAM21Rt9gCc43ozZDm6dQON8ccVRc-CTQSHN5FodXDGzYf4q7AA__12752.0920754009$1661011899$gmane$org@mail.gmail.com> |
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 <[email protected]> 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