appbaseio / reactivesearch

Search UI components for React and Vue
https://opensource.appbase.io/reactivesearch
Apache License 2.0
4.9k stars 468 forks source link

Feature: ability to specify dataField in GeoDistance components #306

Open siddharthlatest opened 6 years ago

siddharthlatest commented 6 years ago

Issue Type:

Enhancement

Platform:

Web / ReactiveMaps

Description:

Currently, the GeoDistance (Dropdown and Slider) components work by using Google's location search functionality, and then fire a query against the selected distance range.

This issue suggests that if a user already has location data in their ES index, we should allow them to optionally search against it (v/s strictly using Google location search).

This can be done by the use of dataField - when a user specifies the data field, they declare an intent of using this field to search the location data against (and use the ES index). When they don't specify this, Google's location search will be used against.

We can also take the location field ( (lat,lon) points) via locationField (currently, this is specified by dataField), which will eventually be used for firing the GeoQuery.

lakhansamani commented 5 years ago

Fixed here https://github.com/appbaseio/reactivesearch/pull/996