Troubleshooting configuration-driven search experiences

Troubleshoot common issues that might occur when you configure and generate a search experience. This topic helps you identify root causes and apply fixes so that your search returns accurate and relevant results.

The following issues cover common setup and integration problems:

Issue 1: Module not found error

Symptom
Error: Specified module OrderModule does not exist.
Cause
You provided a module value, but the module does not exist.
Solution
Complete one of the following options.
  • Create the module before you run the schematic.
  • Remove the module field to generate standalone components.
{
  "metadata": {
    "name": "order-search"
  }
}

Issue 2: Route not working

Symptom
Either the navigation does not work or it returns a 404 error.
Cause
Routes are not registered in the routing module.
Solution
Add the generated components to your routing module.
const routes: Routes = [
  {
    path: 'order/search',
    component: OrderNewSearchComponent
  },
  {
    path: 'order/search-result',
    component: OrderNewSearchResultComponent
  }
];

Issue 3: Pagination not working

Symptom
All records display on a single page.
Cause
You use client-side pagination with a server-side API.
Solution
Set the pagination type to match your API.
{
  "search-results": {
    "pagination": {
      "type": "server-side"
    }
  }
}

Issue 4: Search does not use user-entered criteria

Symptom
The API request does not include the complex query based on user input.
Cause
The integration logic is commented out by default.
Solution
Update the placeholder logic to build the complexQuery by using the selected search fields.