Site Search Issue: Filtering Search


#1

Hello,

I need some help on filtering the results of Site Search API, I'm using this API: /contentsearch/v2/search by using ajax call.
The issue I'm dealing with it has too many results. Even the content of the header, top navigation text, etc, are also included on the results. Is there a way we could limit the search only on the actual content?

Any help is much appreciated. Thanks.
JM


#3

Hi @jmgelogo, you should try using a few of the filters as outlined here: https://developers.hubspot.com/docs/methods/content/search-for-content. A few filter parameters to consider to increase performance:

  • Limit -- limits the number of results returned.
  • Minimum Score -- Specifies the minimum score threshold to return a given result. This parameter is intentionally set low by default in order to return many results.
  • Length -- Can be set to LONG or SHORT . Setting this parameter to SHORT will return a short highlight of the meta description. Setting this parameter to LONG will build the snippet based on the html/content of the page.

Hope this helps answer your question!


#4

Thanks @Connor_Barley!