db.full_sql_query

Background

This parameter specifies the SQL query to execute when performing a full database data source update. The syntax of the SQL query must conform to that required by the underlying database. Creation of a database view for the purpose of search is recommended to simplify the query.

The query is expected to contain a column name matching the db.primary_id_column value and this column’s value will be used to identify the record. If several records share the same value, only one (the latest in the result set) will be indexed.

Each row resulting from the SQL query will be indexed, and the column names will be used as XML element names to allow metadata configuration to control the indexing.

Please note that with most database drivers, a semicolon (;) should not be included at the end of the query.

Setting the key

Set this configuration key in the search package or data source configuration.

Use the configuration key editor to add or edit the db.full_sql_query key, and set the value. This can be set to any valid String value.

Default value

db.full_sql_query=

Examples

db.full_sql_query=SELECT id, summary, body FROM pages WHERE search_index = 'true'