Forum Discussion

Gursimrat's avatar
Gursimrat
Leader
11 years ago

Filter search results parameters

How can I filter the REST results for use in the federated search? 

 

 

Filters as in the default lithium search: http://lithosphere.lithium.com/t5/search-tools/Filter-search-results/ta-p/108617

 

Following API resturns on a success message and no results

 

/restapi/vc/boards/id/Forum/search/messages

 

If I add parameters ?q=date%3A%5B1392206945%20TO%1392293370%5D&collapse_discussion=false then they return the results based on these epoch dates.

 

I want to implement a filter like lithium default search, so how can I use the date parameters to fetch the data based on 

 

  • An hour ago

  • A day ago

  • A week ago

  • A month ago

  • A year ago

     

     

 

1 Reply

  • PaoloT's avatar
    PaoloT
    Lithium Alumni (Retired)
    11 years ago

    Hi Gursimrat 

     

    looks like you are already mastering the date filters in the search api :smileyhappy: In that case, I think you can combine that feature with the datesupport context object to obtain the time boundaries you need and feed them to the API. Some examples of how to handle it can be found here.

     

    Hope this helps,