We are extending the Location Filter rendering with distance and services dropdowns. On the search button click we need to append the distance and services filtering values to url as hash parameters. What's the best approach to perform this change Or are there any other options that we can consider achieve this ?

  • Try this.There should be searchbox js where your search query url is getting created.
    – Hussain
    Jul 31, 2019 at 4:16

1 Answer 1


You can use the existing function of XA.component.search.query (defined in component-search-query.js). For example:

var hash = {};
hash["key"] = "value";

Keep in mind that each of the search components supports search results signatures (you can assign some of the filters to one Search Results rendering and others to second Search Results on the same page). If you want to support this you need to include the signature in hash parameters. This is done in all of the scripts so you have plenty of examples how to do it.

  • This worked perfect. Thank you Dawid Aug 8, 2019 at 16:08
  • @dawid: hash["key"] = "value"; In this code from where it will read the data, is it from the search index? Jan 17, 2021 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.