12-02-2016 02:39 PM
12-02-2016 02:39 PM
We're using Yammer's search API to integrate results with our intranet search. I'm getting lots of questions from our pilots about the results they are seeing. I do know about Yammer's unique qualifiers, so that's not so much the issue here.
We can't figure out what order the results are in, and sometimes it seems like a result isn't even related to the search parameters. I'm guessing that maybe a reply or attachment is relevant, but I'm not sure how to show that.
Any insights or suggestions would be appreciated.
12-06-2016 01:57 AM
I went through a similar experience a couple of months ago.
Two things that might be helpful:
a) The structure of the response from search.json is not documented. Chose a search query when using the front end search in Yammer which brings back many different results (people, conversations, files, etc.). Take this search query and use it to analyze the response from the search.json endpoint to find out what you need from it.
b) About "sometimes it seems like a result isn't even related to the search parameters": There is another, even less documented API endpoint named search_tabs.json. Look at the response it is giving you when using a search query containing at least one result that is being displayed because of a reply not because of an initial message in a conversation. This second API endpoint gives you the necessary data to find out why conversations are included in a search query.
To sum up: If you want to integrate Yammer search results in a complete and usable way you need at least two API endpoints: search.json and search_tabs.json.
Be careful though: Neither of those API endpoints is documented in a way so you can use them without digging into the responses head one. One of them isn't officially acknowledged at all. Keep in mind as well that there is already a new version of the API being used on yammer.com which is using a completely different way to query and respond to search requests.
Hope this helps.
12-12-2016 07:15 AM
Thanks. Given the circumstances, I suppose this is as helpful as anyone can be. I'm reaching out to Microsoft to come up with a better solution. Wish me luck!