{"record":{"id":"dcda5b6dd78c6d28","repo":"Semantic-Org/Semantic-UI","slug":"your-search-returned-no-results","errorCode":null,"errorMessage":"Your search returned no results","messagePattern":"Your search returned no results","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/definitions/modules/search.js","lineNumber":1300,"sourceCode":"  onResults      : function(response){},\n\n  onResultsOpen  : function(){},\n  onResultsClose : function(){},\n\n  className: {\n    animating : 'animating',\n    active    : 'active',\n    empty     : 'empty',\n    focus     : 'focus',\n    hidden    : 'hidden',\n    loading   : 'loading',\n    results   : 'results',\n    pressed   : 'down'\n  },\n\n  error : {\n    source          : 'Cannot search. No source used, and Semantic API module was not included',\n    noResults       : 'Your search returned no results',\n    logging         : 'Error in debug logging, exiting.',\n    noEndpoint      : 'No search endpoint was specified',\n    noTemplate      : 'A valid template name was not specified.',\n    oldSearchSyntax : 'searchFullText setting has been renamed fullTextSearch for consistency, please adjust your settings.',\n    serverError     : 'There was an issue querying the server.',\n    maxResults      : 'Results must be an array to use maxResults setting',\n    method          : 'The method you called is not defined.'\n  },\n\n  metadata: {\n    cache   : 'cache',\n    results : 'results',\n    result  : 'result'\n  },\n\n  regExp: {\n    escape     : /[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g,\n    beginsWith : '(?:\\s|^)'","sourceCodeStart":1282,"sourceCodeEnd":1318,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/modules/search.js#L1282-L1318","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before: only 'title' is searched, term lives in 'description'\n$('.ui.search').search({ source: data, searchFields: ['title'] });\n\n// after\n$('.ui.search').search({ source: data, searchFields: ['title', 'description'] });","handlingStrategy":"fallback","validationCode":"// Verify the term exists in the dataset before relying on results\nvar term = $('#q').val().toLowerCase();\nvar match = data.some(function(d){ return (d.title||'').toLowerCase().indexOf(term) !== -1; });\nif (!match) showEmptyHint();","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["search","no-results","ui-message","semantic-ui"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}