VQL and Search Operators

K2 search is based on the Verity Query Language (VQL). VQL is a rich language for writing queries that return relevant information. VQL includes a large number of operators and modifiers that offer users many options for conducting specific, sophisticated types of search. Your application can implement support for some or all of the available search types.

As one example, the proximity operator <NEAR> allows users to search for occurrences of terms that are close to each other (but not necessarily adjacent) in the indexed documents. A query string to perform a proximity search might look like this:

history <NEAR> philosophy

While it is possible for your application to make such VQL operators directly available to end users, it is more typical (and user-friendly) to hide this level of complexity, instead using checkboxes, buttons, or menus to allow users to select the type of search desired. The user then enters the specific terms to be searched, and your application inserts the appropriate operators and modifiers before submitting the search query to K2.

For some search features described here, support from administrators is also required, in the form of configuration settings made at indexing time so that the necessary extra data structures are created.

By writing complete VQL support into your application, you can turn all your users into search experts even before they start using K2. For complete information about the Verity Query Language and its operators, see the Verity Query Language and Topic Guide.