Configure customer and order search

By default, the Agent Console uses Repository Based Search to search for orders and customers. It can be configured to use textSearch instead through the textSearch Admin endpoint.

When TextSearch is enabled, the Agent user interface uses TextSearch internally. When TextSearch is disabled, the Agent user interface uses Repository Based Search.

To enable TextSearch, issue a PUT request to the textSearch endpoint as follows:

PUT /ccadmin/v1/merchant/textSearch
 {
  "enable": true,
  "scheduledJobs": [
    {
      "scheduledJobName": "orderIncrementalIndexingSchedule",
      "scheduleType": "periodic",
      "schedule": {
        "period": 20000
      }
    },
    {
      "scheduledJobName": "profileIncrementalIndexingSchedule",
      "scheduleType": "periodic",
      "schedule": {
        "period": 20000
      }
    },
    {
      "scheduledJobName": "orderOptimizationSchedule",
      "scheduleType": "calendar",
      "schedule": {
        "occurrenceInDay": 2
      }
    },
    {
      "scheduledJobName": "profileOptimizationSchedule",
      "scheduleType": "calendar",
      "schedule": {
        "occurrenceInDay": 1
      }
    }
  ]
}

The scheduledJobs orderIncrementalIndexingSchedule and profileIncrementalIndexingSchedule are responsible for ensuring that new customers and orders and the latest modifications made to these entities are searchable.

Determine an appropriate schedule for these jobs based on an acceptable interval to search for a customer or order after it is created or modified. Since TextSearch is enabled as default, these jobs are configured to run every 20 seconds.

The scheduledJobs orderOptimizationSchedule and profileOptimizationSchedule are responsible for improving search performance by running an optimization service.

Determine an appropriate schedule for these jobs based on how search performance degrades with the increase in the rate of updates and creations of orders and customers. It is recommended that a schedule frequency of not more than once per day be established.

After issuing a request to enable TextSearch, an offline setup process is initiated which may take a few minutes or more. The setup status can be queried by issuing a GET request to the same endpoint.

If TextSearch was already enabled, issuing another request to enable TextSearch updates scheduledJobs with the new schedule settings and does not initiate any offline setup process.

To disable TextSearch, issue a PUT request to the textSearch endpoint as follows:

PUT /ccadmin/v1/merchant/textSearch { "enable": false }

For more details on this endpoint, refer to the Agent REST API. For more information on how to provide schedule settings, see Configure the scheduled order service in Extending Oracle CX Commerce.