com.raritantechnologies.verity.parametric.queryFilters
Class TaxonomyRankQueryFilter
java.lang.Object
com.raritantechnologies.searchApp.QueryProcessorFilter
com.raritantechnologies.verity.parametric.queryFilters.TaxonomyRankQueryFilter
- All Implemented Interfaces:
- IQueryProcessor
- public class TaxonomyRankQueryFilter
- extends QueryProcessorFilter
Supports ranking of documents within a Parametric Index Taxonomy node. Coordinates
with XML result record in which a taxonomy node ID has been indexed as a zone with a rank
<TaxID_[Taxonomy_ID]>0.85</TaxID_[Taxonomy_ID]>
Takes a query input. If the "taxonomy name" parameter is in the input, indicating that a
user has selected this taxonomy node, the filter creates a cooked VQL query that it adds to
the inputParameter map. To create the query, the filter first looks up the taxonomy node id given
the name of the taxonomy and its value in the input parameter map from a taxonomy ID lookup source.
It then constructs a cooked query for a range of scores. This "maps" the taxonomy score to a Verity
relevance score.
Note that we are working with XML zones here so we cannot do much Math!
Set searchType to search all (not search within).
XML Configuration Template:
<SourceType name="rankedTaxonomyNodes"
type="QueryProcessorFilterSource"
sourceFactoryClass = "com.raritantechnologies.searchApp.QueryProcessorFilterFactory"
filterClass = "com.raritantechnologies.verity.parametric.queryFilters.TaxonomyRankQueryFilter"
inputSource = "Parametric Filter Source"
queryParam="query"
taxIDPrefix="TaxID_" >
<TaxonomyFields>
<Field name="the tax field name" rootPath="its root path value" />
<Field name="another taxonomy field" rootPath="its root path value" />
</TaxonomyFields>
<ScoreMap>
<Score value="1*" relevance="1.0" />
<Score value="9*" relevance="0.9" />
<Score value="8*" relevance="0.8" />
<Score value="7*" relevance="0.7" />
<Score value="6*" relevance="0.6" />
</ScoreMap>
<TaxonomyIDLookup name="search sourceName" taxNameField="input field ID for full taxonomy path"
outputField="output field with Taxonomy ID" />
</SourceType>
Sample VQL:
<or>( ( [0.8]( ( (8*) <in> TaxID_255 ))), ( [0.7]( ( (7*) <in> TaxID_255))))
Developed by
Raritan Technologies .
- Author:
- Ted Sullivan
|
Method Summary |
protected IResultSet |
doExecuteQuery(java.lang.Integer queryID,
ISearchFieldMap searchMap,
SourceLoginInfo[] sources,
OrderedMap inputParameters,
java.lang.Integer pageSize,
java.lang.Integer startRec)
Execution of the query - finds the "real" or proxy IQueryProcessor. |
void |
initialize(org.w3c.dom.Element initElem)
subclasses should override this to initialize themselves. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TaxonomyRankQueryFilter
public TaxonomyRankQueryFilter()
doExecuteQuery
protected IResultSet doExecuteQuery(java.lang.Integer queryID,
ISearchFieldMap searchMap,
SourceLoginInfo[] sources,
OrderedMap inputParameters,
java.lang.Integer pageSize,
java.lang.Integer startRec)
throws QueryProcessorException
- Description copied from class:
QueryProcessorFilter
- Execution of the query - finds the "real" or proxy IQueryProcessor.
- Overrides:
doExecuteQuery in class QueryProcessorFilter
- Throws:
QueryProcessorException
initialize
public void initialize(org.w3c.dom.Element initElem)
- Description copied from class:
QueryProcessorFilter
- subclasses should override this to initialize themselves.
- Overrides:
initialize in class QueryProcessorFilter