-
-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with Custom CSV data in Autocomplete and Reverse Geocoding API #1342
Comments
Hi @toton6868, As it stands right now, Pelias can't do autocomplete on phone numbers or other only-numeric inputs. We intentionally prevent matching of partial number inputs and have done so for a very long time. It made a big difference when matching most addresses. We didn't consider phone numbers at the time. However, since then we've added more logic that might allow us to relax this constraint. @missinglink, considering that we now only match incomplete text on the ngrams index, do you think we could essentially revert pelias/schema#133? It would definitely reduce the complexity of our schema quite a bit. |
@orangejulius Thank you very much. It is quite understandable that phone number will increase the complexity on address searching. Probably I can solve this in different way. But in the case of reverse geocoding custom layer is not returning any data. if I use |
I would be hesitant to produce ngrams for numerals, the hits for an input of This would greatly reduce both performance and accuracy :( [edit] a query like |
@toton6868 I'd suggest changing your config, the In order to use it you can set auto_discover to true and remove everything else inside the targets block. |
@missinglink, now that we only search against the ngrams field for the last word in an autocomplete input, I don't think that the query Let me know if I'm right. The way I understand it generating ngrams for numeric tokens would only affect queries such as the following:
It would be a bit of work to test, but it might allow matching some addresses with fewer keystrokes, especially if there's a focus point to narrow down the search space. |
Sorry for the late reply. After seeing your concern I have changed my dataset. in the name field, I put the owner name and in JSON field I put the phone no. Still, reverse geocoding and nearby is unable to show them in the returned result. even the |
@toton6868 indeed you're right. looks like the reverse endpoint currently filters on a needlessly strict hardcoded list of layers: Lines 44 to 45 in e04a6b2
Turns out we knew about this already from #1161, but hadn't fixed it. Looks like what we'll probably have to do is add something to our TypeMapping system (https://github.com/pelias/api/blob/master/helper/TypeMapping.js) that allows for configuring the list of administrative areas, so that we can then generate a list of all non-admin areas, for use by reverse geocoding and elsewhere. |
Thanks for the quick reply. It will be a great help and feature if you implement in the near future. But currently, if there any quick and dirty method so that I can change in code and that's return custom layers. That will solve my problem for now. I have tried the following hardcoded line with no luck
|
Solved it by hardcoded input of changed the following line to Thanks |
Since it looks like we've solved all the issues here or associated them with known issues tracked elsewhere, I think we can close this issue. If there's anything else, don't hesitate to let us know. By the way, we are considering making changes to Pelias so that phone numbers would be compatible with autocomplete: see pelias/schema#379 |
I have added a CSV file with the help of csv-importer. In the names field, I have a few mobiles no. which starts with
01
I used the source ascsv
and layers ascustom
. I have configured the API parameters of my Config.json as followsWhen I am working with the search API it's working great and returning the correct data. The problem is in Autocomplete and Reverse APIs.
In reverse API the custom layer is not returning any data. if I use
&layers=custom
its returning null data.In Autocomplete API If I put
0171
its not returning any data but when I am entering full mobile no such as01712345678
it's returning only one data. Thus I am unable to use it in Autocomplete.The text was updated successfully, but these errors were encountered: