apache / apache/lucene

Complexphrase queryparser stumbles on phrase query with trailing escaped colon [LUCENE-7650]

Open
#8,701 3 comments 0 reactions 0 assignees View on GitHub
affects-version:5.5.1 affects-version:6.3 legacy-jira-priority:Minor module:core/queryparser type:bug
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

See the attached java code.
ComplexPhraseQueryParser.parse fails with a ParseException when passing a phrase query string having a trailing escaped colon.

---
Migrated from [LUCENE-7650](https://issues.apache.org/jira/browse/LUCENE-7650) by Otmar Caduff, updated Feb 01 2017
Attachments: [ColonTest.java](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-7650/ColonTest.java)

Contributor guide

Open the contributing guide

Research direction

Start with the attached ColonTest.java and reproduce the ParseException from ComplexPhraseQueryParser.parse for a phrase query ending in an escaped colon. Read the parser path handling escaped colons, then verify that the query parses successfully and add regression coverage for the reported input.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.