Semantic-Org/Semantic-UI · info
Your search returned no results
Error message
Your search returned no results
What it means
This is not a console error but a user-facing empty-state message. In generateResults() (search.js:1020-1022), when the response carries no results and settings.showNoResults is true, module.displayMessage(error.noResults, 'empty') renders this text into the results panel and adds the 'empty' class. It signals the query completed but matched nothing.
Source
Thrown at src/definitions/modules/search.js:1300
onResults : function(response){},
onResultsOpen : function(){},
onResultsClose : function(){},
className: {
animating : 'animating',
active : 'active',
empty : 'empty',
focus : 'focus',
hidden : 'hidden',
loading : 'loading',
results : 'results',
pressed : 'down'
},
error : {
source : 'Cannot search. No source used, and Semantic API module was not included',
noResults : 'Your search returned no results',
logging : 'Error in debug logging, exiting.',
noEndpoint : 'No search endpoint was specified',
noTemplate : 'A valid template name was not specified.',
oldSearchSyntax : 'searchFullText setting has been renamed fullTextSearch for consistency, please adjust your settings.',
serverError : 'There was an issue querying the server.',
maxResults : 'Results must be an array to use maxResults setting',
method : 'The method you called is not defined.'
},
metadata: {
cache : 'cache',
results : 'results',
result : 'result'
},
regExp: {
escape : /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,
beginsWith : '(?:\s|^)'View on GitHub (pinned to 597843ab84)
Solutions
- Confirm your source data actually contains the searched term in one of settings.searchFields.
- Widen settings.searchFields (e.g. ['title','description']) so more fields are scanned.
- If the empty message is undesired, set showNoResults: false, or override templates/message for a custom empty state.
Example fix
// before: only 'title' is searched, term lives in 'description'
$('.ui.search').search({ source: data, searchFields: ['title'] });
// after
$('.ui.search').search({ source: data, searchFields: ['title', 'description'] }); Defensive patterns
Strategy: fallback
Validate before calling
// Verify the term exists in the dataset before relying on results
var term = $('#q').val().toLowerCase();
var match = data.some(function(d){ return (d.title||'').toLowerCase().indexOf(term) !== -1; });
if (!match) showEmptyHint(); Prevention
- Align searchFields with the fields users actually query.
- Provide a custom empty-state template for a better UX than the default message.
- Set showNoResults:false if you render your own empty state.
When it happens
Trigger: A search (local or remote) whose query matches zero entries, with showNoResults enabled (default true), so generateResults hits the else branch at search.js:1020 and displays the message.
Common situations: Users typing terms not present in the dataset; a remote endpoint returning {results: []}; filter/searchFields not covering the field the user typed; expecting a result but the data feed is empty.
Related errors
- Cannot search. No source used, and Semantic API module was n
- Error in debug logging, exiting.
- No search endpoint was specified
- A valid template name was not specified.
- searchFullText setting has been renamed fullTextSearch for c
AI-assisted analysis of Semantic-Org/Semantic-UI@597843ab84 (2026-08-13).
Data as JSON: /api/errors/dcda5b6dd78c6d28.
Report an issue: GitHub.