Open mansoor-sajjad opened 1 year ago
Can boundary.gid
be used to replace your forked version which filters on locality_id
and county_id
?
Hi @missinglink,
I have analyzed this option and our requirement.
boundary.gid
is a nice option but it a very limited, it let us filter the results only on one gid, but we need to filter on multiple localities and counties.
I have analyzed the option to extend boundary.gid to boundary.gids Which basically means that we will extend the elasticsearch filter query to multiple values. But then it will be a OR filter across all the parents. And what we are looking for is the Localities AND Counties filter. i.e. separate elasticsearch filter for Localities and Counties so that it will be OR within the single filter and AND across the filters.
Here we are querying the results which have any of the given locality_ids AND any of given county_ids.
A general purpose boundary.gid like boundary.gid=whosonfirst:region:85681677,whosonfirst:region:85682571
would be a very cool feature. That would simplify a mashup of the boundary.country and the boundary.rectangle filter, which still does not fit our search area completly.
We can filter the results by country using pelias-api, by using the
boundary.country
query parameter which will target the country abbreviation field (country_a
) under the parents.We want to have the ability to filter on other parent fields also, may be on Ids instead of abbreviation field.
We are currently using the forked version of pelias-api where we have added ability to search on locality_id and county_id. But this is very specific to out needs. We may find a general solution to filter on any parent field.