How to exclude duplicate topics from search results?
We are using a modified version of the search component. We'd like to exclude topics marked by moderators "duplicate" from showing in the results of this particular search component.
How can we filter the search results? Is there way to check if the topic is a duplicate via the API?
Here is the code from our customized search component (very similar to functionality of new search box on Lithosphere):
<div class="lia-panel-heading-bar-wrapper"><div class="lia-panel-heading-bar"><span class="lia-panel-heading-bar-title ask-a-question-search">${text.format('taplet.askTheExpertTaplet.title')}</span></div></div> <div class="custom-search-wrapper"> <div id="custom-search-border"> <@component id="common.widget.search-form" /> </div> <span class="lia-button-wrapper lia-button-wrapper-primary"> <input type="hidden" name="submitContextX" value="Continue"><input type="submit" name="submitContext" id="submitContext" value="${text.format('form.AskAnExpertForm.action.AskTheCommunity.title')}" class="lia-button lia-button-primary lia-button-Continue-action " title="${text.format('form.AskAnExpertForm.action.AskTheCommunity.title')}"> </span> </div>
Hi iftomkins ,
you are talking about ideas, isn't it?
for status id or status key, i believe that you should use status key, status id is just a number. you can verify the status id and status key via
http://community.lithium.com/restapi/vc/boards/id/Lithium_Ideas/message_statuses/available
for find all ideas with key "Duplicate", via
as you already have your own search box, my suggest was to
- write an endpoint which
- get the input query from http request parameter
- use search/messages to find out the message list with the input query
- iterate the list and remove those messages with status=duplicate
- output the result as a JSON
- write your own "search before post" following this sample code