William
15 years agoHelper
API search type
hi I noticed that in lithium forum, we can get the different result in 2 ways, Topics and Specific posts when searching. now i can get the correct result by Specific posts using following API...
I have the same question and feel it is still not answered here.
My business requirement is: show top 5 threads that are relevant to a given search string.
That is, either "root message" or whatever other message in the thread contains the search string.
The top 5 threads shown should be unique (no duplication).
Also, for each thread shown I need to show some metadata (number of messages in the thread, last post date and user, etc).
So far the closest API method I've found is like:
/search/messages?q=my+search+string&collapse_discussion=true
but it returns messages separately (even if they are in the same thread) and the collapse_discussion parameters seems not working (no change in the result).
Hi altumano,
I think that you should use the following query parameter: "is_root:true"
More info about it, can be found here:
http://lithosphere.lithium.com/t5/Developers/Ssearch-for-count-threads/m-p/57028/highlight/true#M1885