MainJavadocSource
IQueryProcessor

com.raritantechnologies.searchApp
Interface IQueryProcessor

All Known Implementing Classes:
AdhocInfoSearchSource, AutonomyQueryProcessor, BrowseSearchSource, CompositeSearchSource, CurrentResultsSource, DatabaseStatisticsSource, DataCollectorSearchSource, DieselpointQueryProcessor, DQLQueryProcessor, EndecaQueryProcessor, ERoomQueryProcessor, ExaleadQueryProcessor, FastQueryProcessor, FastQueryProcessor, FastSearchViewSource, FederatedQueryProcessor, FileSystemSearchSource, FlatFileSearchSource, HibernateQueryProcessor, HTMLQueryProcessor, HTTPRestSearchSource, InMemorySearchSource, JCRQueryProcessor, LDAPQueryProcessor, LookupQueryProcessor, LuceneMemorySource, LuceneQueryProcessor, MarkLogicQueryProcessor, OmniFindQueryProcessor, OpenSearchSource, PagingFederatedSearch, ParametricQueryProcessor, QueryProcessorFilter, RdfOwlQueryProcessor, RecommendSearchSource, RequestSearchSource, ResultSetQueryProcessor, SearchHistorySource, SelectedRecordsSearchSource.SelectedRecordsQueryProcessor, SevQueryProcessor, SOAPQueryProcessor, SOLRQueryProcessor, SQLQueryProcessor, TaxonomyIDRollupSource, TreeSearchSource, UltraseekQueryProcessor, VerityQueryProcessor, VWebServicesQueryProcessor, Z3950QueryProcessor

public interface IQueryProcessor

Abstract Query Processor Interface: Executes a query against some back end search process (e.g. VQL, DQL, SQL, SOAP, http GET or POST depending on the implementation)

Query Processor has a type - based on the input form which passes the parameters to the processor. Has a protocol (implementation) based on what data source it is searching. The data source is represented by an associated SearchSource object that maintains connection/configuration information.

IQueryProcessors are associated with a SearchSource object. The SearchSource defines the specific characteristics of a data source such as a web site, Verity collection or SQL-compliant database. IQueryProcessor implementations contain the code needed to search any source of a given type, it gets the source-specific information that it needs from the search source.

To execute a search using an IQueryProcessor, a client object first obtains a SearchSource from the ConfigurationManager / ISearchFieldMap given that the client knows the unique name of the source, and then acquires a compatible IQueryProcessor using the following code sequence:

     ConfigurationManager cMan = ConfigurationManager.getInstance( );
     ISearchFieldMap sfMap = cMan.getSearchFieldMap( );

     SearchSource mySource = sfMap.getSearchSource( "My Source Name" );
     IQueryProcessor qProc = mySource.getQueryProcessor( );
 

The following Class diagram demonstrates the basic design of QueryProcessors:




Developed by Raritan Technologies .

Author:
Ted Sullivan

Method Summary
 IResultSetexecuteQuery(java.lang.Integer queryID, ISearchFieldMap searchMap, SourceLoginInfo[] sources, OrderedMap inputParameters, java.lang.Integer pageSize, java.lang.Integer startRec)
          Executes a Query.
 

Method Detail

executeQuery

public IResultSet executeQuery(java.lang.Integer queryID,
                               ISearchFieldMap searchMap,
                               SourceLoginInfo[] sources,
                               OrderedMap inputParameters,
                               java.lang.Integer pageSize,
                               java.lang.Integer startRec)
                        throws QueryProcessorException
Executes a Query. Returns results in the form of an IResultSet object.

Parameters:
queryID - Unique ID for this query. Used by front end to manage queries and query pages. QueryProcessor may use this parameter to organize its search results, and to organize any state information it needs to process future page requests (future executeQuery( ) calls with the same queryID.
searchMap - Provides mapping information needed to translate the inputParameters into a search string appropriate for this type of QueryProcessor. Mapping information is obtained by the application framework from local configuration data.
sources - The LoginInfo and SearchSource(s) to be used for this query. The SearchSource(s) must be of the appropriate type for the QueryProcessor.
inputParameters - Form inputs. Use ISearchFieldMap to translate these into implementation and source-specific fields.
pageSize - Integer specifying the number of results to include in the returned Document. if null - use the default page size.
startRec - Integer specifying the starting record in the result set to be returned. if null - start with the first record.
Returns:
IResultSet containing result set.
Throws:
QueryProcessorException