Package org.apache.solr.search.stats
Class StatsUtil
- java.lang.Object
- 
- org.apache.solr.search.stats.StatsUtil
 
- 
 public class StatsUtil extends Object Various utilities for de/serialization of term stats and collection stats.TODO: serialization format is very simple and does nothing to compress the data. 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringENTRY_SEPARATORstatic charENTRY_SEPARATOR_CHARstatic charESCAPEstatic charESCAPE_ENTRY_SEPARATOR
 - 
Constructor SummaryConstructors Constructor Description StatsUtil()
 - 
Method Summary
 
- 
- 
- 
Field Detail- 
ENTRY_SEPARATORpublic static final String ENTRY_SEPARATOR - See Also:
- Constant Field Values
 
 - 
ENTRY_SEPARATOR_CHARpublic static final char ENTRY_SEPARATOR_CHAR - See Also:
- Constant Field Values
 
 - 
ESCAPEpublic static final char ESCAPE - See Also:
- Constant Field Values
 
 - 
ESCAPE_ENTRY_SEPARATORpublic static final char ESCAPE_ENTRY_SEPARATOR - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
shardUrlToShardpublic static String shardUrlToShard(String collectionName, String shardUrls) Parse a list of urls separated by "|" in order to retrieve a shard name.- Parameters:
- collectionName- collection name
- shardUrls- list of urls
- Returns:
- shard name, or shardUrl if no shard info is present, or null if impossible to determine (eg. empty string)
 
 - 
termsToEncodedStringpublic static String termsToEncodedString(Collection<?> terms) 
 - 
termsFromEncodedStringpublic static Set<org.apache.lucene.index.Term> termsFromEncodedString(String data) 
 - 
fieldsToStringpublic static String fieldsToString(Collection<String> fields) 
 - 
colStatsToStringpublic static String colStatsToString(CollectionStats colStats) Make a String representation ofCollectionStats
 - 
termToEncodedStringpublic static String termToEncodedString(org.apache.lucene.index.Term t) 
 - 
decodepublic static String decode(String value) throws IOException - Throws:
- IOException
 
 - 
termFromEncodedStringpublic static org.apache.lucene.index.Term termFromEncodedString(String data) 
 - 
colStatsMapFromStringpublic static Map<String,CollectionStats> colStatsMapFromString(String data) 
 - 
colStatsMapToStringpublic static String colStatsMapToString(Map<String,CollectionStats> stats) 
 
- 
 
-