Return a list of keywords associated with a place id in Google API? - google-api

Google API allows to retrieve a list of places based on Text Search in an area and the place_id initially retrieved can then be used with Place Details to get more information. However Google doesn't provide relevant keywords associated with this place. I am wondering if given a known place_id, it is possible to search all the associated keywords that would have return this result in a Google search otherwise.
For instance, a Text Search for "Mexican" Restaurant in Chelsea would return a number of places including place_id X. If you search for "Tacos" in Chelsea, it may return a number of places also including place_id X. Is there a way for me to query details about place_id X and return keywords "Mexican" and "Tacos" ?
If not, is there a cost-effective workaround? I thought about creating a master keywords database of 1000+ terms relevant to my market and then query every term in all the areas my app intends to serve and associate each keyword search with place ids but it may cost me a lot vs. querying these details with known place ids directly.
Thank you!

Related

Google Place NearbySearch for Lodging with Price

I want hotel/lodging list within a particular price range.
I tried with maxprice and minprice filter but its returning empty results.
Here is my google places API :
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=18.563102,73.785511&type=lodging&rankby=distance&minprice=0&maxprice=5&key=your_key
But its not returning any result.
Is there API to fetch 'lodging' list within required price range? or get two star hotels?
Please let me know your solutions.
Thank you
The issue here is that when you are looking for hotels/lodging places, there is no 'price_level' attatched to these places like if you were to search for a restaurant using the google places api.

Elastic Search and Search Ranking Models

I am new to Elastic Search. I would like to know if the following steps are how typically people use ES to build a search engine.
Use Elastic Search to get a list of qualified documents/results based on a user's input.
Build and use a search ranking model to sort this list.
Use this sorted list as the output of the search engine to the user.
I would probably add a few steps
Think about your information model.
What kinds of documents are you indexing?
What are the important fields and what field types are they?
What fields should be shown in the search result?
All this becomes part of your mapping
Index documents
Are the underlying data changing or can you index it just once?
How are you detecting new docuemtns/deletes/updates?
This will be included in your connetors, that can be set up in multiple ways, for example using the Documents API
A bit of trial and error to sort out your ranking model
Depending on your use case, the default ranking may be enough.
have a look at the Search API to try out different ranking.
Use the search result list to present the results to the end user

Google Search Appliance sort by metadata content

I'm trying to refine the search results received by my application by including the sort parameter in my HTTP requests. I've combed through the documentation here, but I can't find exactly what I'm looking for.
I'm searching for DOC filetypes, and I am able to sort by date or sort by metadata, as in alphabetizing by title, author, etc. I can also filter by whether or not the title contains certain keywords. What I want to do is to sort by whether or not the title contains certain keywords (these documents appearing first in the results), but to still keep the other results.
For example, with keywords [winter, Christmas, holiday] I could do a descending sort by the sum of inmeta:title~winter, inmeta:title~Christmas, inmeta:title~holiday and the top result might be
Winter holidays other than Christmas
followed by documents with one or two of the keywords, followed by documents that meet the other search parameters but contain no keywords.
Is this possible in GSA?
I finally achieved what I was trying to do, so figured I'd post in case it helps anyone else.
As far as I know, it is impossible to create a query with this capability, but with Google's Custom Search API, you can create a search engine with the desired keywords in the context file (by editing the XML file directly or by adding keywords through the CSE console). Then you can formulate the query as usual, but perform the search on your personalized engine.
https://developers.google.com/custom-search/docs/ranking

Elasticsearch with multiple search criteria

I am try to build a full text search engine using elasticsearch. We have a application which has conferences running across the globe. We have the future and past conferences data. For a POC we have already loaded the conferences details into elasticsearch and it contains fields like title,date,venue,geo_location of the venue as document.
I am able to do simple search using match all query. And also by using function_score I can get the current on going conferences and also using user geo location i can get nearby conferences to users location.
But there are some uses cases where i got stuck and could not proceed. Use cases are.
1) If user try to search with "title + location" then I should not use the user current geo location rather whatever user has provided the city_name use that place geo location and retrieve those doc. Here I know some programming is also required.
2) User search with "title + year", for ex. cardio 2014. User interested to see all the caridology conf of 2014 and it should retrieve that year documents only. But using function score it is retrieving the current years documents.
First of all let me know that above two use cases can be handled in single query. I am thinking to handle it one request, but got stuck.
A proper solution would require you to write your own query parser in your application (outside of elasticsearch) that will parse the query and extract dates, locations, etc. Once all features are extracted, the parser should generate a bool query where each feature would become an appropriate must clause. So, the date would became a range query, the location - geo_location query and everything else would go into a match query for full text matching. Then this query can be sent to elasticsearch.

google place api Incorrect Results

Hi I have a problem with displaying the results of a google place api
When I write nightclub Google search I get results that match my search
But when I search through google place api I get the results is not so correct as Bookstore, apartments for rent and other results not so related
The URL looks like this
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=32.0768214,34.8147987&radius=5000&keyword=Nightclub&sensor=true&language=en&key=MyKey
Thank you!
As the docs state:
keyword — A term to be matched against all content that Google has indexed for this Place, including but not limited to name, type, and address, as well as customer reviews and other third-party content.
So that filter isn't going to be quite as specific as you would like. If you only want to get night clubs, you can use the types param with a value of night_club. See Supported Place Types for all of the other possible values.

Resources