Skip to content

Wildcard star * doesn't work as expected #28

Description

@MartinMa

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions