Esri Geoportal Server
1.0

com.esri.gpt.catalog.lucene.stats
Class SummaryStats

java.lang.Object
  extended by com.esri.gpt.catalog.lucene.stats.SummaryStats

public class SummaryStats
extends Object

Provides summary statistics for the index.

Statistics are unavailable until collected.

Statistics provided are:


Constructor Summary
SummaryStats()
          Construct with a supplied term text.
 
Method Summary
 void collectStats(StatsRequest request, IndexReader reader)
          Executes the collection of statistics.
protected  long determineNumberOfDocsConsidered(IndexReader reader, OpenBitSet documentFilterBitSet)
          Determines the number of documents considered during stats collection.
 long getNumberOfDocsConsidered()
          Gets the number of documents considered during stats collection.
protected  boolean getSortByFrequency()
          Gets the flag indicating whether or not results should be sorted by frequency.
 long getTimeMillis()
          Gets the execution time.
protected  void setNumberOfDocsConsidered(long count)
          Sets the number of documents considered during stats collection.
protected  void setTimeMillis(long millis)
          Sets the execution time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SummaryStats

public SummaryStats()
Construct with a supplied term text.

Method Detail

collectStats

public void collectStats(StatsRequest request,
                         IndexReader reader)
                  throws IOException
Executes the collection of statistics.

Parameters:
request - the active statistics request
reader - the index reader
Throws:
IOException - if an error occurs while communicating with the index

getNumberOfDocsConsidered

public long getNumberOfDocsConsidered()
Gets the number of documents considered during stats collection.

Returns:
the number of documents considered

setNumberOfDocsConsidered

protected void setNumberOfDocsConsidered(long count)
Sets the number of documents considered during stats collection.

Parameters:
count - the number of documents considered

getSortByFrequency

protected boolean getSortByFrequency()
Gets the flag indicating whether or not results should be sorted by frequency.

Returns:
true if results should be sorted by frequency

getTimeMillis

public long getTimeMillis()
Gets the execution time.

Returns:
the execution time (in milliseconds)

setTimeMillis

protected void setTimeMillis(long millis)
Sets the execution time.

Parameters:
millis - the execution time (in milliseconds)

determineNumberOfDocsConsidered

protected long determineNumberOfDocsConsidered(IndexReader reader,
                                               OpenBitSet documentFilterBitSet)
Determines the number of documents considered during stats collection.
If the document filter bitset is not null, the count will be based upon it's cardinality.
Otherwise the count will be based upon the number of docs returned by the reader.

Parameters:
reader - the index reader
documentFilterBitSet - the bitset represing the subset of documents being cosidered
Returns:
the total number of documents

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.