Include test for a search with an empty field condition

Created on 29 August 2023, about 1 year ago
Updated 12 September 2023, about 1 year ago

Problem/Motivation

As mentioned in 🐛 Custom filter groups on a View (Search API index view) are not working Fixed , the current Meilisearch v0.28.1 does not support IS NULL, IS EMPTY, EXISTS and filtering on empty strings is also ignored.

The test for this (https://git.drupalcode.org/project/search_api_meilisearch/-/blob/1.0.x/t...) is therefore currently commented.

Proposed resolution

Upgrade Meilisearch to a more recent v1.x (see parent issue) and enable the test.

Remaining tasks

Is there anything apart from the test that needs to be changed and/or is it possible to add more functionality to this module once Meilisearch supports those operators? A follow-up issue needs to be created, then.

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇦🇹Austria tgoeg

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @tgoeg
  • 🇸🇮Slovenia bcizej

    Is there anything apart from the test that needs to be changed and/or is it possible to add more functionality to this module once Meilisearch supports those operators? A follow-up issue needs to be created, then.

    We will need to create more operator parsers here to deal with these. We don't add an attribute to the document if the value is empty but I am not sure if that also means empty strings (will have to test). So we will definitely need an EXISTS operator parser and depending on if we add empty strings to the document then also IS_EMPTY parser will have to be added.

  • 🇸🇮Slovenia bcizej

    Ready to move forward.

  • Status changed to Needs work about 1 year ago
  • @bcizej opened merge request.
  • Status changed to Needs review about 1 year ago
  • 🇸🇮Slovenia bcizej

    Used EXISTS operator for null value operator parser and uncommented tests

  • 🇸🇮Slovenia DeaOm

    The tests are also passing locally, but when manually testing, not sure if I'm doing something wrong, but if I add the "search full text search" with the empty field filter, I don't get correct results, if I search with the "full text search filter empty" then I get results if filter is also empty, when testing is empty.

    For example, entity title is New entity, subtitle for this entity is empty. The condition are search full text New entity, subtitle filter is empty. I would expect to only get New entity as a result, but I get no results. If I then leave the full text search filter also empty and of course also subtitle, I then get all entities, that have empty subtitle. This part then works correctly. Not sure if it should work together like that. So leaving to needs review for now. If this is how it's suppose to work, then see no issues with this being merged.

  • Status changed to RTBC about 1 year ago
  • 🇸🇮Slovenia DeaOm

    Re-tested because tests were passing, so manual testing needed to be wrong and it was. Basically the fulltext type was set on the wrong field. After changing that, everything works as it should, so marking it RTBC.

    • bcizej committed 299853fc on 2.x
      Issue #3383946 by bcizej, tgoeg, DeaOm: Include test for a search with...
  • Status changed to Fixed about 1 year ago
  • 🇸🇮Slovenia bcizej

    Rebased and merged, thanks.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024