Front-End FAQs

November 14, 2023

Augmented Search UI

Styling

How can I customize the styling of the Augmented Search UI?

Instant Search

How can avoid many API calls while visitors are typing their search criteria?

How can I deactivate instant search?

Facets

Can I use hierarchical facets with categories?

Are facets conjunctive or disjunctive?

Can I index custom properties of type categories?

Can I display more than 5 elements in a facet?

Search box

Can I use quotes to search for exact matches (for example, “my exact search”)?

Can I use boolean operators in the search box, for example AND, OR, or NOT?

Is autocomplete supported on terms that are most searched?

Search results

Can I display additional elements about a node that are not indexed in Elasticsearch?

Highlighting

How does the highlighting work? Is there a match between the language used for lemmatization and the highlighting?

Answers

How can I customize the styling of the Augmented Search UI? 

You can customize the Augmented Search UI module by applying CSS from another template that defines the styling that you want to use. We recommend forking the Augmented Search UI module to adapt it to your requirements (from a styling and functional point of view).

How can avoid many API calls while visitors are typing their search criteria?

In the Augmented Search UI module and in the SearchView.jsx file, modify the value for the debounceLength parameter in the SearchBox component. This parameter defined the number of miliseconds to wait after the last keystroke before submitting the query. If another keystroke occurs during that time, only the lastest query is submitted.

<SearchBox
   searchAsYouType
   debounceLength={100}
/>

See search-ui SearchBox documentation for more information on the SearchBox component and parameters.

How can I deactivate instant search?

Just remove searchAsYouType from the SearchBox component in the SearchView.jsx file.

<SearchBox/>

See search-ui SearchBox documentation for more information on the SearchBox component and parameters.

Can I use hierarchical facets with categories?

Yes, this feature was introduced in Augmented Search 3.0. Please note that the current UI implementation fetches the entire tree at once. This works well for small datasets but is not recommended if the tree is expected to be large or deep.

Are facets conjunctive or disjunctive?

Facets are disjunctive by default. Note that disjunctive facets enable users to select one or more facets to filter search results and conjunctive facets allow users to select only one.

Can I index custom properties of type categories?

Yes, this feature was introduced in Augmented Search 3.0

Can I display more than 5 elements in a facet?

Augmented Searches uses Elastic's search-ui react components for displaying content, all of which are detailed in search-ui repository.

Displaying more than 5 elements is done through the "show" parameter.

Using this file as an example: src/javascript/app/SearchView/SearchView.jsx


  <facet 
    field="jcr:categories.keyword" 
    label="Categories" 
    show={10} 
  />

This will display up to 10 elements.

Can I use quotes to search for exact matches (for example, “my exact search”)?

No, using quotes to get an exact match is not supported by Augmented Search. However, if a search result matches the exact order of the searched words, it will be boosted automatically. 

Can I use boolean operators in the search box, for example AND, OR, or NOT?

No, boolean operators are not supported by Augmented Search.

Is autocomplete supported on terms that are most searched?

No, autocomplete is usually performed on terms that are the most relevant, rather than terms that are most used. 

How does the highlighting work? Is there a match between the language used for lemmatization and the highlighting?

Yes. This will display up to 10 elements.