apache / apache/lucene

FST suggester should allow saving to Directory (not just File) [LUCENE-3618]

Open
#4,692 1 comment 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Major module:suggest type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

Currently FSTCompletionLookup has a store method, taking "File storeDir", which it treats as a directory and then saves the FST to file "fst.bin" inside there.

I think we should also add a store method taking a Lucene Directory? Eg then I can store my suggest FST in a RAMDir.

---
Migrated from [LUCENE-3618](https://issues.apache.org/jira/browse/LUCENE-3618) by Michael McCandless (@mikemccand)

Contributor guide

Open the contributing guide

Research direction

Start with FSTCompletionLookup and inspect its existing store method, including how it writes fst.bin under the supplied File directory. Trace the surrounding suggester storage code to understand the expected Directory API and how a RAMDir would be used. Done means the suggester can save its FST through a Lucene Directory as well as the existing File-based path.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.