public class NormalizingSortedFederationStrategy extends AbstractFederationStrategy
Metacards. The sorting is based on the
Query's SortBy propertyName. The possible sorting values are Metacard.EFFECTIVE,
Result.TEMPORAL, Result.DISTANCE, or Result.RELEVANCE . The supported ordering includes
SortOrder.DESCENDING and SortOrder.ASCENDING. For this class to function properly a sort value and
sort order must be provided.Metacard,
Query,
SortBy| Modifier and Type | Field and Description |
|---|---|
protected static Comparator<ddf.catalog.data.Result> |
DEFAULT_COMPARATOR
The default comparator for sorting by
Result.RELEVANCE, SortOrder.DESCENDING |
| Constructor and Description |
|---|
NormalizingSortedFederationStrategy(ExecutorService queryExecutorService,
List<ddf.catalog.plugin.PreFederatedQueryPlugin> preQuery,
List<ddf.catalog.plugin.PostFederatedQueryPlugin> postQuery,
net.di2e.ecdr.libs.result.relevance.RelevanceNormalizer normalizer)
Instantiates a
SortedFederationStrategy with the provided ExecutorService. |
| Modifier and Type | Method and Description |
|---|---|
protected Runnable |
createMonitor(ExecutorService pool,
Map<ddf.catalog.source.Source,Future<ddf.catalog.operation.SourceResponse>> futures,
ddf.catalog.operation.impl.QueryResponseImpl returnResults,
ddf.catalog.operation.Query query)
Creates the monitor for federated queries.
|
void |
setNormalizeResults(boolean normalize) |
federate, setMaxStartIndexprotected static final Comparator<ddf.catalog.data.Result> DEFAULT_COMPARATOR
Result.RELEVANCE, SortOrder.DESCENDINGpublic NormalizingSortedFederationStrategy(ExecutorService queryExecutorService, List<ddf.catalog.plugin.PreFederatedQueryPlugin> preQuery, List<ddf.catalog.plugin.PostFederatedQueryPlugin> postQuery, net.di2e.ecdr.libs.result.relevance.RelevanceNormalizer normalizer)
SortedFederationStrategy with the provided ExecutorService.queryExecutorService - the ExecutorService for queriesprotected Runnable createMonitor(ExecutorService pool, Map<ddf.catalog.source.Source,Future<ddf.catalog.operation.SourceResponse>> futures, ddf.catalog.operation.impl.QueryResponseImpl returnResults, ddf.catalog.operation.Query query)
AbstractFederationStrategycreateMonitor in class AbstractFederationStrategyreturnResults - the query resultsRunnablepublic void setNormalizeResults(boolean normalize)
Copyright © 2014–2015 Cohesive Integrations, LLC. All rights reserved.