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

Can't filter on documents with double or/and simple quote #2380

Closed
storm23 opened this issue May 6, 2022 · 6 comments · Fixed by meilisearch/milli#552 or #2500
Closed

Can't filter on documents with double or/and simple quote #2380

storm23 opened this issue May 6, 2022 · 6 comments · Fixed by meilisearch/milli#552 or #2500
Labels
bug Something isn't working as expected milli Related to the milli workspace v0.28.0 PRs/issues solved in v0.28.0
Milestone

Comments

@storm23
Copy link

storm23 commented May 6, 2022

Describe the bug
Unable to find document containing an attribute value containing simple or/and double quotes from a filtered search.

To Reproduce
Steps to reproduce the behavior:

  1. insert documents
    POST /indexes/test/documents
[
    {
        "id": "test_1",
        "monitor_diagonal": "27' to 30'"
    },
    {
        "id": "test_2",
        "monitor_diagonal": "27\" to 30\""
    },
    {
        "id": "test_3",
        "monitor_diagonal": "27\" to 30'"
    }
]
  1. Set filterable
    POST /indexes/test/settings
{
    "filterableAttributes": [
        "monitor_diagonal"
    ]
}
  1. Try to find document "test_3"
    POST /indexes/test/search
{
    "filter": [
        "monitor_diagonal = '27\" to 30\\''"
    ]
}

=> 0 hits

Expected behavior
Double escape : \' and \" needs to be interpreted has ' and "

Meilisearch version: [e.g. v0.20.0]
v0.26.1

@storm23 storm23 changed the title Can't find documents with double or simple quote Can't find documents with double or/and simple quote May 6, 2022
@irevoire irevoire changed the title Can't find documents with double or/and simple quote Can't filter on documents with double or/and simple quote May 7, 2022
@curquiza curquiza added the support Issues related to support questions label May 9, 2022
@oluademola
Copy link

Hello @storm23 👋

Thank you for the thorough explanation,  I'm also able to reproduce the issue, which is most certainly a bug. I'll pass this along to our core team for review.

Thank you for bringing this to our attention 🙂

@curquiza curquiza added bug Something isn't working as expected and removed support Issues related to support questions labels May 16, 2022
@curquiza
Copy link
Member

Thanks @oluademola and @storm23 for the report

@irevoire is this bug easy to fix, or is it complexe with our current "filter language"?

@curquiza curquiza added the milli Related to the milli workspace label May 16, 2022
@curquiza
Copy link
Member

Checked directly with @irevoire, should be ok to fix this for v0.28.0, we'll keep you informed if we have any problem solving this

@curquiza
Copy link
Member

curquiza commented Jun 9, 2022

Reopening since it's not fixed on meilisearch side

@curquiza curquiza reopened this Jun 9, 2022
@bors bors bot closed this as completed in 87d4bf6 Jun 9, 2022
@curquiza curquiza added the v0.28.0 PRs/issues solved in v0.28.0 label Aug 24, 2022
@mariopepe
Copy link

It is still a bug!!!

@curquiza
Copy link
Member

curquiza commented Mar 9, 2023

Hello @mariopepe
Can you open a new issue describing how to reproduce the bug you got?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected milli Related to the milli workspace v0.28.0 PRs/issues solved in v0.28.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants