The CONTAINS and SCORE functions are used for text search queries in DB2® Text Search and Net Search Extender. Which of the two solutions is used to process the query is determined via the text index characteristics including the activation status. The query language that is used for DB2 Text Search differs syntactically and semantically from Net Search Extender and it is therefore necessary to consider how to manage the query language differences.
The following are the different types of application migration scenarios.
Add a check on the text index activation status into the application, convert the Net Search Extender syntax into DB2 Text Search syntax, and use the DB2 Text Search syntax when the DB2 Text Search index is active, and the Net Search Extender syntax when the Net Search Extender index is active. The updated application can be deployed independent of the index status. When the DB2 Text Search index is ready for use, switch the activation status. This will automatically activate the new application path. Decoupling application and index migration in this manner will simplify switching the index type as needed.
The basic approach for the application is the same. Add a check on the activation status, convert the syntax and use either the DB2 Text Search syntax or the Net Search Extender syntax depending on the activation status. However, in this case it is required to synchronize switching the activation status for all text indexes that are used in the query.
With Net Search Extender it is necessary to define a document model to apply a section search. DB2 Text Search does implicitly use the XML document structure and enables searches with syntax similar to XPath.
Synonym dictionaries must be converted from Net Search Extender format to DB2 Text Search format.