c2corg / v6_api

REST API for https://www.camptocamp.org
GNU Affero General Public License v3.0
22 stars 26 forks source link

Include associated waypoint title for routes in search index #90

Closed tsauerwein closed 8 years ago

tsauerwein commented 8 years ago

To do once associations are implemented:

Please note that "route" docs are special: we most likely need to get the routes associated to a given waypoint when searching the waypoint title. But the waypoint title is not embedded in the route name (especially when you have several WP associated to a route).

For instance "Mont Blanc":

waypoint: http://www.camptocamp.org/summits/37355/fr/mont-blanc
routes:
    http://www.camptocamp.org/routes/53781/fr/mont-blanc-arete-des-bosses => name in DB is "Arête des Bosses"
    http://www.camptocamp.org/routes/45967/fr/mont-blanc-par-les-grands-mulets-itineraire-classique => name in DB is "Par les Grands Mulets - Itinéraire classique"

https://github.com/c2corg/v6_api/pull/82#issuecomment-160164212

stef74 commented 8 years ago

Hello,

Juste a comment ... on simple search title is sufficiant, but in advanced search we have probably to search an object depending an other. Ex : I want to search a route in Mont-Blanc area we have a WP type is summit and higher than 1000m

My idea is we have to manage some association in search (title for simple imple search other property for advanced search).

I don't know how you manage indexation (and i'm not specialist of ES).

https://www.elastic.co/guide/en/elasticsearch/guide/current/relations.html https://www.elastic.co/guide/en/elasticsearch/guide/current/parent-child.html

asaunier commented 8 years ago

@stef74 I don't know if this is really related to the route title actually indexed by ES. I guess it is more an "advanced search" issue.

stef74 commented 8 years ago

@asaunier I'm agree is not probably directly related to the issue ... but they can influence they to manage that.