[Photon] Q: can photon search on tags? Can I add it?

Sachin Dole sdole at genvega.com
Wed Jan 21 21:33:37 UTC 2015


hello, I followed instructions on README file to download the jar file, the
index, uncompressed the index and ran photon with java -jar
photon-0.1.2.jar inside from the photon_data directory. Server starts up in
about 30 seconds. However, if I go to the test page
http://localhost:2322/api?q=berlin I get a server error on line 67 in
Searcher.java in the "execute" method.

SearchResponse response =
client.prepareSearch("photon").setSearchType(SearchType.QUERY_AND_FETCH).setQuery(query).setSize(limit).setTimeout(TimeValue.timeValueSeconds(7)).execute().actionGet();

What am I missing?



On Mon, Jan 12, 2015 at 2:36 PM, Sachin Dole <sdole at genvega.com> wrote:

> OK. I will look into this. I will need to start from scratch, so, it might
> take me a while to do this. I will report back with questions. Thank you
> Sander for the additional response
> On Jan 12, 2015 12:04 PM, "Christoph Lingg" <christoph at lingg.eu> wrote:
>
>> Good point Sander. There are two approaches to filter results. I thought
>> about importing all documents and filtering on query time, whilst Sander's
>> approach avoids even importing those documents.
>>
>> Cheers,
>> Christoph
>>
>> Am 12.01.2015 um 18:56 schrieb Sander van Tulden <
>> sander.vantulden at falk.nl>:
>>
>>  Hi Sashin,
>>
>>  For my use case we needed to filter out all POIs and certain other
>> tags. I made a solution for this (beware, it is pretty quick'n'dirty and
>> could use some optimizations) for Photon. I use a json file with a
>> tag->value whitelist, so the importing process only uses the tags of the
>> json file for the index. You could take a look at this (closed) PR here:
>> https://github.com/komoot/photon/pull/129
>>
>>  It might help you solve your use case,
>>
>>  Greets,
>>
>>  Sander van Tulden
>>
>>
>> Op 12 jan. 2015 om 18:46 heeft Sachin Dole <sdole at genvega.com> het
>> volgende geschreven:
>>
>>  That is very nice of you not only to reply but also to add reg_name to
>> index.
>>
>> 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.
>>
>> 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> 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. 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
>>>
>>>  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>:
>>>
>>>  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/
>>>
>>>  THANKS a lot!
>>>
>>>  Best,
>>> Sachin Dole
>>>
>>>  _______________________________________________
>>> Photon mailing list
>>> Photon at openstreetmap.org
>>> https://lists.openstreetmap.org/listinfo/photon
>>>
>>>
>>>
>>> _______________________________________________
>>> Photon mailing list
>>> Photon at openstreetmap.org
>>> https://lists.openstreetmap.org/listinfo/photon
>>>
>>>    _______________________________________________
>> Photon mailing list
>> Photon at openstreetmap.org
>> https://lists.openstreetmap.org/listinfo/photon
>>
>>  _______________________________________________
>> Photon mailing list
>> Photon at openstreetmap.org
>> https://lists.openstreetmap.org/listinfo/photon
>>
>>
>>
>> _______________________________________________
>> Photon mailing list
>> Photon at openstreetmap.org
>> https://lists.openstreetmap.org/listinfo/photon
>>
>>


-- 
President  |  Genvega Inc.  |  www.genvega.com  |  tel: 630.290.2561
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/photon/attachments/20150121/f17fa546/attachment.html>


More information about the Photon mailing list