Here-Maps Autocomplete return incorrect results for Postcodes - autocomplete

we uses the Here-Technologies REST-API (Geocoding & Search API V7) for Autocomplete.
As example is I search für "Arnhem" we will get a correct result for Arnhem (NL).
But when we search Postcodes the results are not very good.
Here I have two examples:
1.) Search for "6828" or "6828 CD" (Arnhem, NL) will do not return any result. This Problem is present for other cities and countries, too.
In Netherlands we had the most problems with Postcodes. In Germany, Austria, .. we have sometimes this problem.
2.) Search for "2300" (Copenhagen) will only return a result if the value "in" is filled with "DNK".
If we search this values into the in-house map of Here-Technologies (https://wego.here.com) we will get the correct results for all.
Does someone had any idea what we can do to get better results?
Thank you!

Related

how to find partial search in Mongodb?

How to find partial search?
Now Im trying to find
db.content.find({$text: {$search: "Customer london"}})
It finds all records matching customer, and all records matching london.
If I am searching for a part of a word for example lond or custom
db.content.find({$text: {$search: "lond"}})
It returns an empty result. How can I modify the query to get the same result like when I am searching for london?
You can use regex to get around with it (https://docs.mongodb.com/manual/reference/operator/query/regex/). However, it will work for following :
if you have word Cooking, following queries may give you result
cooking(exact matching)
coo(part of the word)
cooked(The word containing the english root of the document word, where cook is the root word from which cooking or cooked are derived)
If you would like to go one step further and get a result document containing cooking when you type vooking (missplled V instead of C), go for elasticsearch.
Elasticsearch is easy to setup, has extremely powerful edge-ngram analyzer which converts each words into smaller weightage words. Hence when you misspell, you will still get a document based on score elasticsearch gives to that document.
You can read about it here : https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-edgengram-tokenizer.html
it will always return the empty array for partial words like when you are searching for lond to get this type of text london..
Because it take full words and search same as that they are ..
Not achive same results like :-
LO LON LOND LONDO LONDON
Here you may get help from ELASTIC-SEARCH . It is quite good for full text search when implement with mongoDB.
Refrence : ElasticSearch
Thanks
The find all is to an Array
clientDB.collection('details').find({}).toArray().then((docs) =>
I now used the str.StartWith in a for loop to pick out my record.
if (docs[i].name.startsWith('U', 0)) {
return console.log(docs[i].name);
} else {
console.log('Record not found!!!')
};
This may not be efficient, but it works for now

Twitter advanced search by date AND location for research purposes

I'm trying to research a topic and I need to get all tweets within 2013 and 2015 and a specific location for two keywords.
I tried to get the results via Advanced Search but I allways get no results.
I tried:
cannabis near:"España" within:15mi since:2013-10-07 until:2015-01-01
cannabis near:"Spain" within:15mi since:2013-10-07 until:2015-01-01
Basically, I have a database of scraped press articles sorted by date from a bunch of sources, and I want to know how the agenda of this news sources have an impact on the social media conversation.
I could do it over Reddit if it was the case for the US, but there's no Spanish alternative (well, we have Meneame, but the user base is very left-leaning and I think it will be very narrow).
So I wanted to either scrape the search results or get them via API, but It's not working, and AFAIK I can't do anything similar with Facebook.
One way to achieve this is by using Twitter's geocode operator. In the example below i took Madrid as a center and covered a radius of 600km around it like this:
(canabis OR cannabis) geocode:40.4381311,-3.8196196,600km since:2013-10-07 until:2015-12-31
Try it...
The syntax is as follows:
([your_boolean_search_query]) geocode:[latitude],[longitude],[radius]km since:[] until:[]
one easy way to find latitudes and longitudes of locations is to use Google Maps. Simply navigate to a place using the search box and then copy the latitude and longitude element from the URL line in the browser. Here it is for Madrid. The latitude and longitude are right after the # sign, separated by a comma:
https://www.google.com/maps/place/Madrid,+Spain/#40.4381311,-3.8196196,54451m/data=!3m2!1e3!4b1!4m5!3m4!1s0xd422997800a3c81:0xc436dec1618c2269!8m2!3d40.4167754!4d-3.7037902?hl=en
Try it...

Use Google Places autocomplete vs nearbysearch with rankby=distannce

I am looking to use Google Places autocomplete to help user search for places near him/her. When using autocomplete in the example below, I get establishment that are very far from the location.
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=pizza&types=establishment&location=37.340871,%20-122.029642&rankby=distance&key=mykey
I assume Google considers the popularity of the establishment in the result set. My question: is there a way to get back the list sorted by proximity to the location, i.e. "turn off" the popularity index? (and to get similar functionality to the nearbysearch with autocomplete) ?
Why not just using nearbysearch? because nearbysearch does not perform well when only part of the name is entered as keyword ( I assume nearbysearch assume the 'keyword' parameter is the complete word).
Thanks for your help!

Does the use of place parameter in queries using the Facebook Graph API affect the results of post searches?

I 've been trying to test the place parameter when used for searching post using the Facebook Graph API. However it does not seem to affect results !!
For example:
https://graph.facebook.com/search?q=coffee&type=post&center=44,55&distance=1000
in the previous URL results do not change when I change the values of latitude and longitude (44,55) or the radius (1000)
Am I doing something wrong ?
I think the "distance" and "center" parameters only work when you use the parameter "type=place".
e.g. The two links below return demonstrate this.
https://graph.facebook.com/search?q=coffee&type=place&center=44.270962,55.096039&distance=1000&access_token=[access_token]
https://graph.facebook.com/search?q=coffee&type=place&center=53.270962,-6.096039&distance=1000&access_token=[access_token]
Once you have all the places returned, you could then do a further search on each place for their posts that contain coffee...

How to use keywords include ampersand(&) in Facebook Search API

I want to use some keywords that include special characters like & in Facebook search api. I tried the query below but I cannot get useful results. Is there any chance for this usage in search api? How should I build my search query?
My example queries and keywords are "H&M", "marks & spencer",
http://graph.facebook.com/search?type=post&limit=25&q="H&M"
http://graph.facebook.com/search?type=post&limit=25&q="marks & spencer"
My team worked on this forever, ended up finding this as a solution that provides relevant results for a query with an ampersand, such as 'H&M'.
%26amp%3b
This is the hex equivilent to &
So your example link would be
http://graph.facebook.com/search?type=post&limit=25&q="H%26amp%3bM"
We found the solution thanks to Creative Jar
You want %26 which is the URL encode for ampersand so
http://graph.facebook.com/search?type=post&limit=25&q="H%26M" http://graph.facebook.com/search?type=post&limit=25&q="marks %26 spencer"
Depending on your language, it may have a URL encoding function or you can just use string replacement.
It seems, that all of solutions suggested here are not working any more.
Searching for q=H%26%bM returns empty data set. The same for q=H%26M.
It must have changed recently, in last 2 months.
If you try to search for postings about H&M on Facebook site (type H&M in search, then "Show me more results" on the bottom of list and then public posts on menu on the left side) the list is empty.
The only query that returns any results is q=H&M but it is not helpful, as the results are irrelevant for that query.