org.apache.lucene.facet.search
Class FacetArrays

java.lang.Object
  extended by org.apache.lucene.facet.search.FacetArrays

public class FacetArrays
extends Object

Provider of arrays used for facet operations such as counting.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
FacetArrays(IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)
          Create a FacetArrays with certain array allocators.
 
Method Summary
 void free()
          Notify allocators that they can free arrays allocated on behalf of this FacetArrays object.
 int getArraysLength()
          Return the arrays length
 float[] getFloatArray()
          Obtain a float array, e.g.
 int[] getIntArray()
          Obtain an int array, e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FacetArrays

public FacetArrays(IntArrayAllocator intArrayAllocator,
                   FloatArrayAllocator floatArrayAllocator)
Create a FacetArrays with certain array allocators.

Parameters:
intArrayAllocator - allocator for int arrays.
floatArrayAllocator - allocator for float arrays.
Method Detail

free

public void free()
Notify allocators that they can free arrays allocated on behalf of this FacetArrays object.


getIntArray

public int[] getIntArray()
Obtain an int array, e.g. for facet counting.


getFloatArray

public float[] getFloatArray()
Obtain a float array, e.g. for evaluating facet association values.


getArraysLength

public int getArraysLength()
Return the arrays length