This started as a search engine for OSM data. For details see docs.
This code is work in progress and is to change frequently.
-
As of now this is a completion engine for local data. It uses the
photon
format, so all geocoding libraries that support that format should work out-of-the-box. -
This is intended to be a drop-in replacement for the project
https://github.com/komoot/photon
. The endpoint_query/api/v1/photon/{profile}
is the currently available photon-compatible endpoint. -
The reverse geocoder is with identical syntax at endpoint
_query/api/v1/notoph/{profile}
. -
Adaptor for importing Nominatim is provided. You can also use your own data. Other adaptors are wip.
-
Profile based search . You can create several profiles , each with different set of rules for the same endpoint. There is a
default
profile for all searches which uses a pre-set . -
Traine-able spellchecker . The spellchecker can be trained from a file containing training data.
-
Supports rudimentary replication. All write queries go to master, read queries are on slave. If master goes down one slave becomes master.
-
There is now support for a separate search store for text data. Basic idea is to have local data queries which will mostly be location based in one index and wiki data which will mostly be text based in another. This is with identical syntax as above photon at endpoint
_query/api/v1/textdata/{profile}
.
For instructions on setting up the development environment see docs/COMPILE.md
Look at the folder test for expected query. The test/test_ scripts are for testing, you will need httpie. For details see docs
Note the number of concurrent connections is limited by number of active threads, you can adjust it
by setting LIBASYNC_NUM_THREADS
as an environment variable before compiling. By default this will
take the no of CPU cores of the server.
export LIBASYNC_NUM_THREADS=32
This project uses code from
-
https://github.com/eidheim/Simple-Web-Server ( web server )
-
https://github.com/yinqiwen/ardb ( Geohash )
-
https://github.com/bakwc/JamSpell ( Spell checker )
... for the sparse documentation, I will make a more detailed description when time permits.