Default Query

Hi all, I am a Hong Kong developer who are making a online shopping platform and if I want to set some default result, how can I get it done by using search ui, does it support it?

I know we can set "AND" "OR" query, but if I want to set a sample results of products,for example, to show many products in customers' wishlist. I need to set multi query but does it support in search ui?

Here is my config now but the query would be too long

let config = {
  alwaysSearchOnInitialLoad: true,
  searchQuery: {
    query: "doc-5e3a9bb6a1f322f8d040573c OR doc-5e3a9bb4a1f3222dbe40547e OR doc-5e3a9bb2a1f322bd364052bf OR doc-5e3a9bb4a1f3222dbe405453 OR doc-5e3a9bb7a1f3225fa14057ef",
  },
  apiConnector: connector
  // initialState: {
  //   searchTerm:
  //     "doc-5e3a9bb6a1f322f8d040573c OR doc-5e3a9bb4a1f3222dbe40547e OR doc-5e3a9bb2a1f322bd364052bf OR doc-5e3a9bb4a1f3222dbe405453 OR doc-5e3a9bb7a1f3225fa14057ef"
  // },
};

This have to be closed as I found that we can use filter and it perfectly solve my question that I have been faced for a week....

Glad you got it working. Please share a snippet of code if you can for the benefit of people reading this thread in the future.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.