Created on 8 November 2023, about 1 year ago
Updated 25 January 2024, 11 months ago

Hi,does the current version of the module support spatial search?

Feature request
Status

Needs work

Version

2.0

Component

Code

Created by

🇬🇷Greece pinkonomy

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

Merge Requests

Comments & Activities

  • Issue created by @pinkonomy
  • Pipeline finished with Failed
    about 1 year ago
    #48746
  • First commit to issue fork.
  • Merge request !47Resolve #3400077 "Spatial search" → (Open) created by admirlju
  • Pipeline finished with Failed
    about 1 year ago
    #50078
  • Pipeline finished with Failed
    about 1 year ago
    #50079
  • Status changed to Needs work about 1 year ago
  • First, to answer the question, no the current version of the module does not support spatial search.

    So I started working on a submodule, to integrate with the Search API Location (FYI the current view integration in that module doesn't work correctly with Drupal 10.1, you need to use the dev version, but it will probably be fixed soon).

    To integrate that functionality, I had to add some events to the Search API Meilisearch backend since I had to modify indexing, searching, and filtering. Still, I don't think the location functionality should be part of the parent module since not everyone will need Search API Location in the first place.

    A few things, Meilisearch expects geosearch to be saved in a field called _geo formatted as JSON containing lat & lng variables. One way this could have been solved was to force the machine name to always be _geo, but this didn't feel right to me, so now I do these translations on the fly.
    The second thing and this is also the reason I can do the previous thing. Meilisearch expects only one spatial field, so I also validate that people can't add multiple spatial fields per index.

    While I think the functionality is finished, you can index location data, it correctly returns it, and filtering with it also works. The tests for new functionality still have to be added, so marking it as needs work. Also, the tests are failing because of 📌 Fix gitlab-ci Needs review

  • Pipeline finished with Failed
    about 1 year ago
    #50737
  • Pipeline finished with Failed
    about 1 year ago
    #50738
  • Noticed, that there is a way to sort by geo data. Looking into implementing that too.

  • Pipeline finished with Failed
    about 1 year ago
    #51448
  • Pipeline finished with Failed
    about 1 year ago
    #51449
  • Pipeline finished with Failed
    about 1 year ago
    #51451
  • Pipeline finished with Canceled
    about 1 year ago
    #51466
  • Pipeline finished with Failed
    about 1 year ago
    #51468
  • Pipeline finished with Failed
    about 1 year ago
    #51494
  • Pipeline finished with Success
    about 1 year ago
    #51499
  • Status changed to Needs review about 1 year ago
  • Implemented sorting. Also had to implement many more changes, than what Search API Location expects, but sorting should now work. Remember how meilisearch implements geo sorting, it's probably going to be the last factor when it's collecting relevant data.

  • Status changed to Needs work about 1 year ago
  • 🇸🇮Slovenia bcizej

    Branch rebased and added DI for event dispatcher.

Production build 0.71.5 2024