Best Practices

Database Query

  • Provide a valid SQL query that works in the Database application. Read: SQL Query for Database Collection
  • Map unique id to uid field. This is a mandatory requirement for successful indexing.
  • Map a relevant field as the title to be displayed in search results.
  • If you do not have a unique field, you can use a view with a unique field in select query. You can create a view with a unique field as a combination of fields.

Database Settings

  • Provide the valid settings for the database.
  • Provide database settings or complete database URL string based on the database type selected.
  • Test the SQL and database settings by clicking the Test SQL button in the Database Collection Settings page. Verify that it is successful before indexing.

Indexing

  • Set the schedule for indexing based on the interval in which the collection has to be reindexed.
  • Minimum time range for the schedule is Daily. If the time taken to index all the records in database collection is more than 24 hours, then it is recommended to provide a larger interval say once in two days, four days, etc.
  • After indexing completes, the reindexing would be done based on the Schedule specified.
  • To check the status of records indexed please go to index.log in the path <SEARCHBLOX_INSTALLATION_PATH>/webapps/ROOT/logs and check the entries across the database collection name.