mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-25 14:26:27 +00:00
rename some histogram collectors
This commit is contained in:
parent
cea8c5fefa
commit
83b728a384
@ -102,14 +102,14 @@ public class HistogramFacetProcessor extends AbstractComponent implements FacetP
|
||||
}
|
||||
|
||||
if (valueScript != null) {
|
||||
return new KeyValueScriptHistogramFacetCollector(facetName, keyField, scriptLang, valueScript, params, interval, comparatorType, context);
|
||||
return new ValueScriptHistogramFacetCollector(facetName, keyField, scriptLang, valueScript, params, interval, comparatorType, context);
|
||||
} else if (valueField == null) {
|
||||
return new CountHistogramFacetCollector(facetName, keyField, interval, comparatorType, context);
|
||||
} else if (keyField.equals(valueField)) {
|
||||
return new FullHistogramFacetCollector(facetName, keyField, interval, comparatorType, context);
|
||||
} else {
|
||||
// we have a value field, and its different than the key
|
||||
return new KeyValueHistogramFacetCollector(facetName, keyField, valueField, interval, comparatorType, context);
|
||||
return new ValueHistogramFacetCollector(facetName, keyField, valueField, interval, comparatorType, context);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ import java.io.IOException;
|
||||
*
|
||||
* @author kimchy (shay.banon)
|
||||
*/
|
||||
public class KeyValueHistogramFacetCollector extends AbstractFacetCollector {
|
||||
public class ValueHistogramFacetCollector extends AbstractFacetCollector {
|
||||
|
||||
private final String keyIndexFieldName;
|
||||
|
||||
@ -58,7 +58,7 @@ public class KeyValueHistogramFacetCollector extends AbstractFacetCollector {
|
||||
|
||||
private final HistogramProc histoProc;
|
||||
|
||||
public KeyValueHistogramFacetCollector(String facetName, String keyFieldName, String valueFieldName, long interval, HistogramFacet.ComparatorType comparatorType, SearchContext context) {
|
||||
public ValueHistogramFacetCollector(String facetName, String keyFieldName, String valueFieldName, long interval, HistogramFacet.ComparatorType comparatorType, SearchContext context) {
|
||||
super(facetName);
|
||||
this.interval = interval;
|
||||
this.comparatorType = comparatorType;
|
@ -43,7 +43,7 @@ import java.util.Map;
|
||||
*
|
||||
* @author kimchy (shay.banon)
|
||||
*/
|
||||
public class KeyValueScriptHistogramFacetCollector extends AbstractFacetCollector {
|
||||
public class ValueScriptHistogramFacetCollector extends AbstractFacetCollector {
|
||||
|
||||
private final String indexFieldName;
|
||||
|
||||
@ -59,7 +59,7 @@ public class KeyValueScriptHistogramFacetCollector extends AbstractFacetCollecto
|
||||
|
||||
private final HistogramProc histoProc;
|
||||
|
||||
public KeyValueScriptHistogramFacetCollector(String facetName, String fieldName, String scriptLang, String valueScript, Map<String, Object> params, long interval, HistogramFacet.ComparatorType comparatorType, SearchContext context) {
|
||||
public ValueScriptHistogramFacetCollector(String facetName, String fieldName, String scriptLang, String valueScript, Map<String, Object> params, long interval, HistogramFacet.ComparatorType comparatorType, SearchContext context) {
|
||||
super(facetName);
|
||||
this.comparatorType = comparatorType;
|
||||
this.fieldDataCache = context.fieldDataCache();
|
Loading…
x
Reference in New Issue
Block a user