com.raritantechnologies.searchApp.queryFilters
Class DeduplicatingQueryProcessorFilter
java.lang.Object
com.raritantechnologies.searchApp.QueryProcessorFilter
com.raritantechnologies.searchApp.queryFilters.DeduplicatingQueryProcessorFilter
- All Implemented Interfaces:
- IQueryProcessor
- public class DeduplicatingQueryProcessorFilter
- extends QueryProcessorFilter
De-duplicates IResultSets obtained from one or more
proxy SearchSources using some (configurable) field
matching criterion. May use another search source to make a decision if two results are the same.
Merges the result field values of non-key fields to create a single result with the combined
values from the duplicate results (if any). Buffers the deduplicated results so that the pageSize
and start record of the initial request can be honored. May re-execute the search in order
to achieve the currently requested page size.
Configurable option determines if a union (logical OR) or intersection (logical AND) operation
is performed on the result sets from the deduplicated sources.
Max cache size setting is used to ensure that all results are considered before adding deduped results
to the output result set.
XML Configuration Template:
<SourceType name="[ name of DeduplicatingQueryProcessorFilter source]"
type="QueryProcessorFilterSource"
sourceFactoryClass = "com.raritantechnologies.searchApp.QueryProcessorFilterFactory"
filterClass = "com.raritantechnologies.searchApp.queryFilters.DeduplicatingQueryProcessorFilter"
inputSource = "[ name of SearchSource that collects the results to deduplicate ]" >
<!-- Specify set of fields to match on -->
<MatchFields>
<Field ID="[ field name ]" />
</Field>
</MatchFields>
<SourceType>
Developed by
Raritan Technologies .
- Author:
- Ted Sullivan
|
Method Summary |
IResultSet |
executeQuery(java.lang.Integer queryID,
ISearchFieldMap searchMap,
SourceLoginInfo[] sources,
OrderedMap inputParameters,
java.lang.Integer pageSize,
java.lang.Integer startRec)
Base implementation executes the query then starts filter chain. |
void |
initialize(org.w3c.dom.Element elem)
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 |
DeduplicatingQueryProcessorFilter
public DeduplicatingQueryProcessorFilter()
executeQuery
public IResultSet executeQuery(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
- Base implementation executes the query then starts filter chain.
- Specified by:
executeQuery in interface IQueryProcessor- Overrides:
executeQuery in class QueryProcessorFilter
- Throws:
QueryProcessorException
initialize
public void initialize(org.w3c.dom.Element elem)
- Description copied from class:
QueryProcessorFilter
- subclasses should override this to initialize themselves.
- Overrides:
initialize in class QueryProcessorFilter