[Photon] Q: can photon search on tags? Can I add it?
Christoph Lingg
christoph at lingg.eu
Mon Jan 12 17:53:44 UTC 2015
Hi Sachin,
> I have another q for you, please: how can I use photon to search with a filter on tags? For example, I know that my app is only interested in nodes, ways and relations that have the tag with key "tourism" or a combination of a few different tags. In this case, I would like to completely filter out Hawaii county from results, while, still showing Hawaii state and Hawaii airport and various beaches in Hawaii state.
>
That's one of the feature people asked the most. It is on the top of my todo list, but at the moment I am very busy closing this ticket and releasing version 0.2 https://github.com/komoot/photon/issues/102 <https://github.com/komoot/photon/issues/102>
Actually a filter should be very easy to implement. First we need a nice concept on how url parameters could look like. Then we need to parse those filter params here https://github.com/komoot/photon/blob/master/src/main/java/de/komoot/photon/RequestHandler.java <https://github.com/komoot/photon/blob/master/src/main/java/de/komoot/photon/RequestHandler.java> and extend the elastic search query here: https://github.com/komoot/photon/blob/master/src/main/java/de/komoot/photon/elasticsearch/Searcher.java <https://github.com/komoot/photon/blob/master/src/main/java/de/komoot/photon/elasticsearch/Searcher.java>
Let me know if you want to implement it, of course I will give you a hand!
Cheers,
Christoph
> Once again, I would love to roll up my sleeves and get my hands dirty if that's what it will need.
>
> Thank you once again.
>
> On Jan 12, 2015 11:22 AM, "Christoph Lingg" <christoph at lingg.eu <mailto:christoph at lingg.eu>> wrote:
> Hi Sachin,
>
> thanks for your feedback. Photon searches in much more than name, also street country, housnumber, postcode and administrative levels.
>
> We are already including a bunch of name variants, like loc_name.
>
> Reg name is not used very often, see http://taginfo.openstreetmap.org/keys/reg_name <http://taginfo.openstreetmap.org/keys/reg_name>. Anyway, you were just writing at a moment when I was working on the importer, so I just regional names to the photon index. see https://github.com/komoot/photon/commit/a8bc9b255ddffd47103172b579e47fd38c642786 <https://github.com/komoot/photon/commit/a8bc9b255ddffd47103172b579e47fd38c642786>
>
> We are currently working on reimporting new data, if we are lucky we will have a new photon version by the end of this week. Keep the finger crossed.
>
> Cheers,
> Christoph
>
>> Am 12.01.2015 um 13:09 schrieb Sachin Dole <sdole at genvega.com <mailto:sdole at genvega.com>>:
>>
>> Hello,
>>
>> Can photon search on other tags than just name? For example, if you search for "Big Island", photon does not return the main island of United States state of Hawai'i. On nominatim, it returns correctly. In this case, the "name" of the relation is "Hawai'i" but "reg_name" is "Big Island" and nominatim search correctly. If photon currently does not allow for this, can I try to add this ability on a fork? I will have to start from scratch (create a new database etc), and I have no problem doing so if indeed it is needed. If it already exists, it will be great if you can show me an example on http://photon.komoot.de/ <http://photon.komoot.de/>
>>
>> THANKS a lot!
>>
>> Best,
>> Sachin Dole
>>
>> _______________________________________________
>> Photon mailing list
>> Photon at openstreetmap.org <mailto:Photon at openstreetmap.org>
>> https://lists.openstreetmap.org/listinfo/photon <https://lists.openstreetmap.org/listinfo/photon>
>
>
> _______________________________________________
> Photon mailing list
> Photon at openstreetmap.org <mailto:Photon at openstreetmap.org>
> https://lists.openstreetmap.org/listinfo/photon <https://lists.openstreetmap.org/listinfo/photon>
>
> _______________________________________________
> Photon mailing list
> Photon at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/photon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/photon/attachments/20150112/15813dbf/attachment-0001.html>
More information about the Photon
mailing list