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

Phrase search doesn't return existing document #1913

Closed
CaroFG opened this issue Nov 18, 2021 · 21 comments · Fixed by meilisearch/milli#419
Closed

Phrase search doesn't return existing document #1913

CaroFG opened this issue Nov 18, 2021 · 21 comments · Fixed by meilisearch/milli#419
Assignees
Labels
bug Something isn't working as expected v0.25.0 PRs/issues solved in v0.25.0
Milestone

Comments

@CaroFG
Copy link
Collaborator

CaroFG commented Nov 18, 2021

Describe the bug
Phrase search doesn't return existing document

To Reproduce
Steps to reproduce the behavior:

  1. Download and launch v0.24 of MeiliSearch
  2. Add the movies dataset provided in the documentation
  3. Search for "the path of Fallon" without quotes
  4. A document with this sentence in the description is returned (movie name: Judgment Night)
  5. Search this time with the same query surrounded by quotes (phrase search)
  6. No results

Expected behavior
The document with the matching query words should be returned

Screenshots

Capture d’écran 2021-11-18 à 12 31 30

Capture d’écran 2021-11-18 à 12 31 43

MeiliSearch version:
v0.24

Additional context
Additional information that may be relevant to the issue.
macOS

@curquiza curquiza added this to the v0.25.0 milestone Nov 18, 2021
@curquiza curquiza added the bug Something isn't working as expected label Nov 18, 2021
@curquiza
Copy link
Member

curquiza commented Nov 18, 2021

Hello @CaroFG!

Thanks for the report. Looks like the phrase search does not work with more than 3 words.
This is indeed a bug, we will do our best to fix it for v0.25.0!

@meilisearch/core-team 🔥 we should add tests (probably on milli's side) 🔥

@CaroFG
Copy link
Collaborator Author

CaroFG commented Nov 18, 2021

It works when I search for "the four become his unwilling prey" (same movie, another part of the overview)...

@curquiza
Copy link
Member

So weird... thanks for this!

@curquiza
Copy link
Member

curquiza commented Nov 18, 2021

For people wanting a perfect working phrase search, use v0.21.0 in the meantime. Sorry for the inconvenience

bors bot added a commit to meilisearch/milli that referenced this issue Nov 23, 2021
419:  fix word pair proximity indexing r=ManyTheFish a=ManyTheFish

# Pull Request

Sort positions before iterating over them during word pair proximity extraction.

fixes [Meilisearch#1913](meilisearch/meilisearch#1913)

Co-authored-by: many <maxime@meilisearch.com>
@ManyTheFish
Copy link
Member

ManyTheFish commented Nov 23, 2021

Reopen this issue because it isn't fixed in meilisearch but only in milli.

@ManyTheFish ManyTheFish reopened this Nov 23, 2021
@alfonsrv
Copy link

alfonsrv commented Dec 1, 2021

Having a similar issue; searching for a single, distinct word e.g. "PCS5581337" doesn't return/find all documents with that content.

It returns some. Looking at the document contents for returning and non-returning documents, they seem to be structured very similarly, both having the search phrase as a standalone word of the list/array. Can provide more in-depth details if required.

@gmourier
Copy link
Member

gmourier commented Dec 3, 2021

Hi @alfonsrv. Your description makes me think of this bug too. The next release should fix it. You will be able to test it in advance when the release candidate is out. If all goes well, it should happen next week!

@curquiza
Copy link
Member

curquiza commented Dec 6, 2021

Fixed when milli has been updated, so in #1796

@curquiza curquiza closed this as completed Dec 6, 2021
@alfonsrv
Copy link

alfonsrv commented Dec 7, 2021

@gmourier I actually realized I'm on meilisearch-http 0.22.0 judging by the Docker executable /meilisearch -V fyi

Assumed I was on v0.24 because I am using the latest tag in my Docker-Compose file and always forcing rebuilds.

Will wait for v0.25 to be released on Dockerhub and then report back.

@curquiza
Copy link
Member

curquiza commented Dec 7, 2021

Hello @alfonsrv, the first RC of v0.25.0 is out if you want to test :) https://github.com/meilisearch/MeiliSearch/releases/tag/v0.25.0rc0

@francoism90
Copy link

@curquiza Any ETA on when a new release would be possible?

I'm going to try the new RC, ty. :)

@curquiza
Copy link
Member

curquiza commented Jan 3, 2022

@francoism90
v0.25.0 will be released next week!
Let us know if the RC works as you expect!

@alfonsrv
Copy link

alfonsrv commented Jan 3, 2022

Hard to get reproducible results since the index has to be recreated, but so far it works as expected aka no missing documents were noticed.

@francoism90
Copy link

@curquiza I did tried the RC, but it doesn't seem to work with the current Laravel Scout driver?

@curquiza
Copy link
Member

curquiza commented Jan 3, 2022

The RCs are the release candidate versions, so not the official releases. It means our integrations are not up-to-date with the RCs.
It currently does not work with the laravel scout driver because the latest version of meilisearch-php you use is only compatible with v0.24.0. The compatible version of meilisearch-php with MeiliSearch v0.25.0 is not released yet.

@francoism90
Copy link

francoism90 commented Jan 3, 2022

@curquiza Ok, will you provide a meilisearch-php version for next release?

It states the following:

This package version is compatible with MeiliSearch v0.24.0 and later, but not with v0.23.1 and older. Be sure you are using at least MeiliSearch v0.24.0 or newer before doing the upgrade.

Should I report the issue I've encountered when using it on the RC or should I try the bump-meilisearch-v0.25.0 branch first? :)

@curquiza
Copy link
Member

curquiza commented Jan 3, 2022

Will you provide a meilisearch-php version for next release?

Yes :)

Should I report the issue I've encountered when using it on the RC or should I try the bump-meilisearch-v0.25.0 branch first? :)

No need to report the issue. However the bump-meilisearch-v0.25.0 branch is still in development, not sure you will be able to use it immediately.

@vdiaz1130
Copy link

Hi,

I'm not sure if this is related but I'm searching in my categories index for "men" and expecting both "women" and "men" to be returned but am only seeing "men".

Am I missing something in my configuration? Using meilisearch: ^0.24.0.

// 
query: {
  q: "men",
  options: {
    offset: null,
    limit: 1000,
    attributesToRetrieve: [
      "*",
    ],
  },
};

client.search(query.q, query.options); // only returns mens category

@francoism90
Copy link

@vdiaz1130 Could you try "*men"?

If I'm not mistaken, this is default behavior, as Meilisearch is more autocomplete searching.

@vdiaz1130
Copy link

@francoism90 That doesn't seem to work. I tried it on the Meili client as well as in my search field.

@MarinPostma
Copy link
Contributor

@francoism90 globbing like that is not supported by MeiliSearch

@vdiaz1130 unfortunately, MeiliSearch only supports prefix search, not suffix/infix search, so women is not matched by men

Hope that helps

@curquiza curquiza added the v0.25.0 PRs/issues solved in v0.25.0 label Aug 24, 2022
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 v0.25.0 PRs/issues solved in v0.25.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants