Created on 8 November 2023, 8 months ago
Updated 25 January 2024, 5 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
    8 months ago
    #48746
  • First commit to issue fork.
  • Merge request !47Resolve #3400077 "Spatial search" → (Open) created by admirlju
  • Pipeline finished with Failed
    7 months ago
    #50078
  • Pipeline finished with Failed
    7 months ago
    #50079
  • Status changed to Needs work 7 months 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
    7 months ago
    #50737
  • Pipeline finished with Failed
    7 months ago
    #50738
  • Noticed, that there is a way to sort by geo data. Looking into implementing that too.

  • Pipeline finished with Failed
    7 months ago
    #51448
  • Pipeline finished with Failed
    7 months ago
    #51449
  • Pipeline finished with Failed
    7 months ago
    #51451
  • Pipeline finished with Canceled
    7 months ago
    #51466
  • Pipeline finished with Failed
    7 months ago
    #51468
  • Pipeline finished with Failed
    7 months ago
    #51494
  • Pipeline finished with Success
    7 months ago
    #51499
  • Status changed to Needs review 7 months 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 7 months ago
  • 🇸🇮Slovenia bcizej

    Branch rebased and added DI for event dispatcher.

Production build 0.69.0 2024