com.raritantechnologies.verity.query
Class SimpleThesaurusCooker

java.lang.Object
  extended bycom.raritantechnologies.verity.query.SimpleThesaurusCooker
All Implemented Interfaces:
IQueryCooker

public class SimpleThesaurusCooker
extends java.lang.Object
implements IQueryCooker

Cooks queries to add thesausus support. Adds <thesaurus> operator to VQL for selected fields.

Can be used in one of two modes:
XML Configuration Template:
  <QueryCooker class="com.raritantechnologies.verity.query.SimpleThesaurusCooker"
                  expandQueryField="[ comma separated list of fields to expand with thesaurus operator ]"
                  multipleFieldOperator="and|or" />
 


Developed by Raritan Technologies .

Author:
Ted Sullivan

Constructor Summary
SimpleThesaurusCooker()
           
 
Method Summary
 java.lang.String getHighlightQuery(java.lang.String[] searchSources, OrderedMap queryParams, ISearchFieldMap searchMap, ILoginInfo userInfo)
          returns a query suitable for use with Verity highlighting processes.
 java.lang.String getSourceQuery(java.lang.String[] searchSources, OrderedMap queryParams, ISearchFieldMap searchMap, ILoginInfo userInfo)
          returns a Verity Query Language (VQL) Source Query.
 java.lang.String getVerityQuery(java.lang.String[] searchSources, OrderedMap queryParams, ISearchFieldMap searchMap, ILoginInfo userInfo)
          returns a Verity Query Language (VQL) string for the form parameters submitted in queryParams.
 void initialize(org.w3c.dom.Element elem)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleThesaurusCooker

public SimpleThesaurusCooker()
Method Detail

getVerityQuery

public java.lang.String getVerityQuery(java.lang.String[] searchSources,
                                       OrderedMap queryParams,
                                       ISearchFieldMap searchMap,
                                       ILoginInfo userInfo)
Description copied from interface: IQueryCooker
returns a Verity Query Language (VQL) string for the form parameters submitted in queryParams. The Search sources are needed to map the input params to the verity collection fields. This mapping can be different for different search sources.

Specified by:
getVerityQuery in interface IQueryCooker

getSourceQuery

public java.lang.String getSourceQuery(java.lang.String[] searchSources,
                                       OrderedMap queryParams,
                                       ISearchFieldMap searchMap,
                                       ILoginInfo userInfo)
Description copied from interface: IQueryCooker
returns a Verity Query Language (VQL) Source Query.

Specified by:
getSourceQuery in interface IQueryCooker

getHighlightQuery

public java.lang.String getHighlightQuery(java.lang.String[] searchSources,
                                          OrderedMap queryParams,
                                          ISearchFieldMap searchMap,
                                          ILoginInfo userInfo)
Description copied from interface: IQueryCooker
returns a query suitable for use with Verity highlighting processes.

Specified by:
getHighlightQuery in interface IQueryCooker

initialize

public void initialize(org.w3c.dom.Element elem)
Specified by:
initialize in interface IQueryCooker