Smile-SA / elasticsuite

Smile ElasticSuite - Magento 2 merchandising and search engine built on ElasticSearch
https://elasticsuite.io
Open Software License 3.0
761 stars 341 forks source link

Geo search Filter condition #973

Closed alakhdeveloper closed 6 years ago

alakhdeveloper commented 6 years ago

We have index the geolocation values at the elasticsearch. Now, we need to filter geolocation with the elasticsuites. how can we filter the geo location with nested condition. Please help

Preconditions

Magento Version : CE 2.1

ElasticSuite Version : 2.3.10

Environment : developer

Third party modules :

Steps to reproduce

  1. we use nested type to store the geo location : EX: field name="hyperlocal.sellerid" type="integer" nestedPath="hyperlocal" field name="hyperlocal.location" type="geo_shape" nestedPath="hyperlocal"
  2. its indexing fine. But we are not able to add filter for the geo location with nested.

Expected result

1.

Actual result

  1. [Screenshot, logs]
afoucret commented 6 years ago

Hi @alakhdeveloper,

Your issue is related to an outdated version of ElasticSuite (2.3.x) and we don't support it as part of our community / open source version support.

That being said, geo_shape and geo filters are not implemented by ElasticSuite and if you need it you will need:

  1. Implement a new query type (Smile\ElasticsuiteCore\Search\Request\QueryInterface)
  2. Register it against the Smile\ElasticsuiteCore\Search\Request\Query\QueryFactory using DI
  3. Create a new query builder into our ElasticSearch adapter (Smile\ElasticsuiteCore\Search\Adapter\Elasticsuite\Request\Query\BuilderInterface
  4. Register it against Smile\ElasticsuiteCore\Search\Adapter\Elasticsuite\Request\Query

Then you will have the ability to use your new query types in building queries.

I close since it does not concern a existing feature of ElasticSuite and we do not plan to work on this.