Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wildcard star * doesn't work as expected #28

Open
MartinMa opened this issue Feb 14, 2023 · 0 comments
Open

Wildcard star * doesn't work as expected #28

MartinMa opened this issue Feb 14, 2023 · 0 comments

Comments

@MartinMa
Copy link
Contributor

The current implementation for wildcard * does not comply with the Lucene Syntax "specification".

The docs state the following:

Implements the wildcard search query. Supported wildcards are *, which matches any
character sequence (including the empty one), and ?, which matches any single
character. '\' is the escape character.

Source: https://github.com/apache/lucene/blob/branch_9_4/lucene/core/src/java/org/apache/lucene/search/WildcardQuery.java
Source: https://lucene.apache.org/core/2_9_4/queryparsersyntax.html

However, liqe treats * as an arbitrary character sequence of minimum length 1. While as per documentation, an empty character sequence is allowed as well.

I know that liqe is just a "Lucene-like" parser, serializer and search engine. But I wonder if this design choice was on purpose or by accident?

I would like to adjust the search engine to comply with the standard in this subject.

How do you think about it?

I know that it would mean a breaking change. But you could bump the version number.

An alternative solution would be that the filter function takes a config param and the standard behavior can be activated with some sort of strict flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant