apache / apache/lucene

Completion regex query uses UTF32 automaton [LUCENE-8480]

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

Description

The completion regex query builds an UTF-32 automaton but the completion FST uses UTF-8 internally. This makes the matching of any non basic latin character impossible in a regex completion query.

---
Migrated from [LUCENE-8480](https://issues.apache.org/jira/browse/LUCENE-8480) by Jim Ferenczi (@jimczi), updated Oct 18 2018

Contributor guide

Open the contributing guide

Research direction

Start by tracing the completion regex query and how it builds its automaton, then compare that encoding with the completion FST's UTF-8 representation. Reproduce the failure with a non-basic-Latin character and verify that regex completion matching works for such characters once the encoding mismatch is addressed.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.