Getstream- How to get a trending hashtags? - getstream-io

If the hashtag for 10 activities has python and 15 activities for techie,then need a trending hashtag how do i filter that?
trending hashtag 1:techie and hashtag 2:python

how do you want to display this? Something showing the most hashtags first, then next highest, etc? I would think an aggregated feed that follows all your hashtag feeds would work here, and you aggregate on the hashtag. Then you'll need to sort on your own before displaying, as we don't allow ranking on aggregated feeds.
If that's not what you're trying to do please elaborate. Thanks!

Related

How to use grouping and aggregation in NetSuite saved search?

I want to create a search that filters the records like Display the name of every customer and Sum of amount of orders placed by that customer in the last thirty days. I want to apply the search on sales orders.
In the results Tabs try this:

Foursquare API: suggestcompletion near specified city

My aim is to find venues in specific city.
For this purpose i am using /v2/venues/suggestcompletion endpoint. So for example next request https://api.foursquare.com/v2/venues/suggestcompletion/?limit=10&query=McDonald&near=Napa,%20CA,%20United%20States&client_id=xxx&client_secret=yyy&v=20161118&locale=en returns venues not only in Napa, but also in Fairfield, Vallejo etc. Result for this query.
Ok, as far as I know what city I need I can filter result by city on my side. But in this approach I received next problem. Next query https://api.foursquare.com/v2/venues/suggestcompletion/?limit=10&query=Diviera%20Drive&near=New%20York,%20NY,%20United%20States&client_id=xxx&client_secret=yyy&v=20161118&locale=en returns venue in city labeled Brooklyn. Result for this Obviously New York string and Brooklyn does not match. Maybe somehow I can retrieve main city (New York) next to borough (Brooklyn) so I can filter it on my side properly
So my question is: how can I receives venues only in specified city.
The near parameter you're using is not a filter - it's a coarse geocoder that's used to generate a latitude/longitude to search near.
The search documentation does not show a way to limit results to a city name. If you only want to show results in a certain city you'd have to do that filtering yourself. Since the city name may be missing or incorrect (sometimes city boundaries are fuzzy) a more precise way could be filter based on the lat/lng coordinate.

Solr: Apply faceting when query contains particular terms

I have a database of product information indexed by name, type, manufacturer, etc. Users often submit search queries whose results would be contained neatly in one or more facets. When this situation arises, I would like for Solr to parse the query and apply the relevant facets.
For example, searching shoes should return results in the shoe category. More ambitiously, searching plaid shirt should query plaid on items in the shirt category.
Is it possible to configure Solr to do this?
Thanks in advance.
Asking Solr to do what you want is a tall order. Your best bet would be to store categories in a field that is weighted very highly. For example, if you have a category field with the value of "shoes", having a hit on that field will increase the relevance of documents on that category, thus having them show up first. Same goes for the second example.
As for faceting, your question is not clear on how you want to apply faceting.

Is there a way to "Expire" items in an Azure Search Index?

In Azure Search is there a mechanism to set an "Expiration Date" on items within the index? I have a need for items to only be in the search index for a pre-defined period of time.
Not at this time. For now, you need to send a delete request to delete an item in an index.
We often refer to this capability as Time to Live. It would be great if you could vote for this feature to help us prioritize it, if you would find it valuable.
http://feedback.azure.com/forums/263029-azure-search/suggestions/6328648-time-to-live-for-data
Liam
As Liam mentions, there isn't at the moment.
One option might be to add an "Expiry" field with a type of Edm.DateTimeOffset into your documents and have all your queries only request documents whose expiry date is greater than the current timestamp.

Foursquare venue photo order

I am doing a Foursquare query on venues and I need to get a list of photos. I noticed that the photos in the array are ordered by the "createdAt" key. Is there any part of the API that would return the photos in the order they are ranked in Foursquare, or at least get the top ranked photo?
Yup, a venues/photos call returns results in the order that they're ranked on Foursquare in order of "best."

Resources