Forum Discussion

ratnesh's avatar
ratnesh
Lithium Alumni (Retired)
12 years ago
Solved

Search only ideas and not posts using restapi

Hi,

 I want to search the ideas from Idea Exchange which I have been able to do it

 

BUT the seach api also return the post made on "Change Status" in idea exchange.

I am using the following rest api call and it gives the posts as well

http://mycommunity.stage.lithium.com/restapi/vc/boards/id/IDEAExchangeID/search/messages?q=SEARCHTEXT

 

In short, I want to implement similar to the default autocomplete search available for Idea Exchange.

 

Suggest me the appropriate REST API call.

 

Thanks,

Ratnesh

 

  • Unfortunately I believe you'll have to include it as part of the q parameter. If you're dealing with an unencoded parameter value and the encoding happens downstream, I'd suggest you try taking out the "+" characters to avoid those being considered part of the query itself. For example: "SEARCHTEXT AND is_root:true"

     

    If that doesn't help, would it be possible for you to share a snippet of what's not working for you?

5 Replies

  • ratnesh's avatar
    ratnesh
    Lithium Alumni (Retired)
    12 years ago
    hi adam,
    Is there a way to use any other query parameter name since we have to attach it to "q" as string "+AND+is_root:true" is getting encoded when finally the api call is made and is not what the outcome is expected.
  • AdamN's avatar
    AdamN
    Khoros Oracle
    12 years ago

    Unfortunately I believe you'll have to include it as part of the q parameter. If you're dealing with an unencoded parameter value and the encoding happens downstream, I'd suggest you try taking out the "+" characters to avoid those being considered part of the query itself. For example: "SEARCHTEXT AND is_root:true"

     

    If that doesn't help, would it be possible for you to share a snippet of what's not working for you?

  • ratnesh's avatar
    ratnesh
    Lithium Alumni (Retired)
    12 years ago
    This has helped. Thanks again.

    -Ratnesh