public class UniquenessCalculator extends Object implements Calculator, Serializable
| Modifier and Type | Field and Description |
|---|---|
static String |
CALCULATOR_NAME |
static String |
SUFFIX |
static int |
SUFFIX_LENGTH |
| Constructor and Description |
|---|
UniquenessCalculator(SolrClient solrClient) |
UniquenessCalculator(SolrClient solrClient,
Schema schema) |
| Modifier and Type | Method and Description |
|---|---|
String |
getCalculatorName()
Get the name of the calculator.
|
String |
getCsv(boolean withLabel,
CompressionLevel compressionLevel)
Get result as comma separated string.
|
List<String> |
getHeader()
Get header (the name of metrics) as a list.
|
Map<String,Map<String,? extends Object>> |
getLabelledResultMap()
Get hierarchical result map.
|
List<String> |
getList(boolean withLabel,
CompressionLevel compressionLevel) |
Map<String,? extends Object> |
getResultMap()
Get results as a simple map.
|
List<UniquenessField> |
getSolrFields() |
String |
getTotals() |
void |
measure(PathCache cache)
Measure something from the JSON input object.
|
public static final String CALCULATOR_NAME
public static final String SUFFIX
public static final int SUFFIX_LENGTH
public UniquenessCalculator(SolrClient solrClient)
public UniquenessCalculator(SolrClient solrClient, Schema schema)
public String getCalculatorName()
CalculatorgetCalculatorName in interface Calculatorpublic void measure(PathCache cache)
Calculatormeasure in interface Calculatorcache - The JSON cache objectpublic String getTotals()
public Map<String,? extends Object> getResultMap()
CalculatorgetResultMap in interface Calculatorpublic Map<String,Map<String,? extends Object>> getLabelledResultMap()
CalculatorgetLabelledResultMap in interface Calculatorpublic String getCsv(boolean withLabel, CompressionLevel compressionLevel)
CalculatorgetCsv in interface CalculatorwithLabel - Flag whether the individal parts should contain the
metric or not.compressionLevel - If the value is a double, it is possible to
remove the zeroes from the end, so make the
value a bit compressed.public List<String> getList(boolean withLabel, CompressionLevel compressionLevel)
getList in interface Calculatorpublic List<String> getHeader()
CalculatorgetHeader in interface Calculatorpublic List<UniquenessField> getSolrFields()
Copyright © 2020. All rights reserved.