fish*~ parses to PrefixQuery - should be a parse exception [LUCENE-375]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
QueryParser parses "fish\*\" into a "fish\*" PrefixQuery and silently drops the \. This really should be a
parse exception.
---
Migrated from [LUCENE-375](https://issues.apache.org/jira/browse/LUCENE-375) by Erik Hatcher (@erikhatcher), updated Nov 30 2013
Environment:
```
Operating System: other
Platform: Other
```
Linked issues:
- #2898
Contributor guide
Research direction
Start by locating Lucene's QueryParser implementation and its parser tests, then reproduce the `fish*` input described in the issue. Trace why the malformed suffix becomes a PrefixQuery instead of an error. Done means the input raises a parse exception and the existing valid wildcard and prefix cases remain covered.
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
- 42/100