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

Recognizing "0" #23

Open
JC5 opened this issue Dec 28, 2022 · 1 comment
Open

Recognizing "0" #23

JC5 opened this issue Dec 28, 2022 · 1 comment
Assignees
Labels

Comments

@JC5
Copy link

JC5 commented Dec 28, 2022

Hi,

Somebody reported an issue where they could not search for amount_more:"0". Doing some delving, it looks like amount_more:0 works as expected but amount_more:"0" does not. The former is recognized as a Field, the latter as a Word.

I can work around it because using amount_more:"0.0" would fix this. But is this behavior expected?

Thanks!

@gdbrown
Copy link
Contributor

gdbrown commented Dec 28, 2022

looks like a bug to me. I added a test locally test-queries.php

    [
        'name'            => 'just zero',
        'input'           => 'just_zero:"0"',
        'expected_tokens' => [
            [T::T_FIELD_START, 'just_zero'],
            [T::T_WORD, '0'],
            [T::T_FIELD_END],
        ],
        'expected_nodes'  => [
            new Field('just_zero', new Phrase('0'), BoolOperator::OPTIONAL, false, Field::DEFAULT_BOOST),
        ],
    ],

does for sure fail. thanks for find this.

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

No branches or pull requests

2 participants