org.apache.lucene.facet.example.simple
Class SimpleSearcher

java.lang.Object
  extended by org.apache.lucene.facet.example.simple.SimpleSearcher

public class SimpleSearcher
extends Object

SampleSearcer searches index with facets.

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

Constructor Summary
SimpleSearcher()
           
 
Method Summary
static List<FacetResult> searchWithDrillDown(org.apache.lucene.index.IndexReader indexReader, TaxonomyReader taxoReader)
          Search an index with facets drill-down.
static List<FacetResult> searchWithFacets(org.apache.lucene.index.IndexReader indexReader, TaxonomyReader taxoReader)
          Search an index with facets.
static List<FacetResult> searchWithRequest(org.apache.lucene.index.IndexReader indexReader, TaxonomyReader taxoReader, FacetIndexingParams indexingParams, FacetRequest... facetRequests)
          Search an index with facets for given facet requests.
static List<FacetResult> searchWithRequestAndQuery(org.apache.lucene.search.Query q, org.apache.lucene.index.IndexReader indexReader, TaxonomyReader taxoReader, FacetIndexingParams indexingParams, FacetRequest... facetRequests)
          Search an index with facets for given query and facet requests.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleSearcher

public SimpleSearcher()
Method Detail

searchWithFacets

public static List<FacetResult> searchWithFacets(org.apache.lucene.index.IndexReader indexReader,
                                                 TaxonomyReader taxoReader)
                                          throws Exception
Search an index with facets.

Parameters:
indexReader - index reader.
taxoReader - taxonomy reader.
Returns:
facet results
Throws:
Exception - on error (no detailed exception handling here for sample simplicity

searchWithRequest

public static List<FacetResult> searchWithRequest(org.apache.lucene.index.IndexReader indexReader,
                                                  TaxonomyReader taxoReader,
                                                  FacetIndexingParams indexingParams,
                                                  FacetRequest... facetRequests)
                                           throws Exception
Search an index with facets for given facet requests.

Parameters:
indexReader - index reader.
taxoReader - taxonomy reader.
indexingParams - the facet indexing params
facetRequests - facet requests of interest
Returns:
facet results
Throws:
Exception - on error (no detailed exception handling here for sample simplicity

searchWithRequestAndQuery

public static List<FacetResult> searchWithRequestAndQuery(org.apache.lucene.search.Query q,
                                                          org.apache.lucene.index.IndexReader indexReader,
                                                          TaxonomyReader taxoReader,
                                                          FacetIndexingParams indexingParams,
                                                          FacetRequest... facetRequests)
                                                   throws Exception
Search an index with facets for given query and facet requests.

Parameters:
q - query of interest
indexReader - index reader.
taxoReader - taxonomy reader.
indexingParams - the facet indexing params
facetRequests - facet requests of interest
Returns:
facet results
Throws:
Exception - on error (no detailed exception handling here for sample simplicity

searchWithDrillDown

public static List<FacetResult> searchWithDrillDown(org.apache.lucene.index.IndexReader indexReader,
                                                    TaxonomyReader taxoReader)
                                             throws Exception
Search an index with facets drill-down.

Parameters:
indexReader - index reader.
taxoReader - taxonomy reader.
Returns:
facet results
Throws:
Exception - on error (no detailed exception handling here for sample simplicity


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.