Skip to main content

Search widget features

Widget features are passed as a comma-separated list in the features attribute of the <nuclia-search-bar> tag:

<script src="https://cdn.nuclia.cloud/nuclia-video-widget.umd.js"></script>
<nuclia-search-bar
knowledgebox="YOUR-KB"
zone="ZONE"
features="answers,filter"
></nuclia-search-bar>
<nuclia-search-results></nuclia-search-results>

For the correct reading of the results, the width of the search bar should not be less than 384px.

If your search page background color isn't neutral, remember to add a background color on your search box to make it easier to read.

Suggestions

This feature displays a list of suggestions when the user starts typing in the search bar.

Suggest entities

This feature displays the list of entities identified in the user input when the user starts typing.

Label suggestions

This feature guesses the appropriate labels when the user starts typing in the search bar.

It only works if your KB has been trained for label suggestions.

Filter

This feature displays in the search bar a dropdown menu listing all the existing labels, allowing the user to filter the results by label.

Answer generation

This feature will trigger the answer generation process when the user makes a search.

The first answer is displayed between the search bar and the results, and by clicking on Chat with your docs, the user can access the full chat interface.

Ony answers

This feature displays answers but not search results. This option applies only if answer generation is enabled.

Hide sources

This feature hides the sources associated with the generated answer.

Relations

When the user’s query contains an entity, this feature displays an info card on the right side of the widget listing all the relations this entity can have.

When a search result is a link field, or has an URL in the origin metadata, this feature will redirect the user to the URL when clicking on the result instead of displaying the default viewer.

Target new tab

This feature allows to open results in a new tab. It only works if the Navigate to links or Navigate to files features are enabled.

When a search result is a file field, this feature will open the file in the browser when clicking on the result instead of displaying the default viewer.

If you want users to be able to share a resource preview with a friend or a colleague, enable permalink mode by adding the permalink attribute to <nuclia-widget> in your code snippet.

When the widget is displaying results, it adds corresponding search query and criteria to the URL, allowing the widget to re-render the same results upon loading.

Similarly, when the widget is showing a resource, it adds the resource id to the URL, allowing the widget to render this resource directly upon loading.

Automatic filtering

This feature detects entities mentioned in the user query and turns them automatically into filters.

Display metadata

This feature displays the metadata associated with the resource in the result rows.

Hide thumbnails

This feature hides the thumbnails associated with the resource in the result rows.

Only semantic results for answers

When enabled, answers will be generated using semantic results only.

Note: by default, it is based on both semantic and BM25 results.

Dark mode

This feature displays the widget in dark mode.