apache / apache/lucene

AnalyzingSuggester needs reasonable limits on max suggestion length [LUCENE-5660]

Open
#6,722 7 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Major type:bug
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

Issues like #6690 LUCENE-5659 are hacks around the problem that the AnalyzingSuggester allows automata to "explode".

I don't think we should try to hack up the automata lib to the point its un-understandable to support this, since its designed for smaller automata such as queries and is appropriate for that.

We should instead just set appropriate limits out of box so AnalyzingSuggester doesnt blow up.

Remember this is a suggester, it needs to be fast. The fact that the automata lib blows up on stupid unit tests or whatever are doing this, instead of being silently slow, is a good thing.

---
Migrated from [LUCENE-5660](https://issues.apache.org/jira/browse/LUCENE-5660) by Robert Muir (@rmuir)
Attachments: [LUCENE-5660.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-5660/LUCENE-5660.patch)

Contributor guide

Open the contributing guide

Research direction

Start with AnalyzingSuggester and review the linked LUCENE-5660.patch, then compare the related workaround in issue #6690/LUCENE-5659. Determine suitable default limits that prevent automata from exploding while keeping suggestions fast; done means the suggester enforces those limits without relying on automata-library hacks.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.