degu.pagesearcher.ejb
Class PageIndexSearcher

java.lang.Object
  extended by degu.pagesearcher.ejb.PageIndexSearcher

public class PageIndexSearcher
extends java.lang.Object


Field Summary
private  org.apache.lucene.analysis.Analyzer analyzer
           
private  org.apache.lucene.search.highlight.Formatter formatter
           
private static int FRAGMENT_SIZE
           
private  org.apache.lucene.search.highlight.SimpleFragmenter fragmenter
           
private  org.apache.lucene.search.highlight.Highlighter high
           
private  LuceneIndexDescriptor idxDesc
           
private  org.apache.lucene.index.IndexReader indexReader
           
private  org.apache.lucene.search.IndexSearcher indexSearcher
           
private static org.apache.log4j.Logger logger
           
private static int MAX_BEST_FRAGMENTS
           
private static int MAX_BYTES_TO_ANALYZE
           
private static int MAX_HITS
           
private  org.apache.lucene.queryParser.QueryParser pageQueryParser
           
private  org.apache.lucene.queryParser.QueryParser queryParser
           
private  org.apache.lucene.search.highlight.Scorer scorer
           
 
Constructor Summary
PageIndexSearcher(LuceneIndexDescriptor idxDesc)
          ctor
 
Method Summary
 void close()
           
 void intitialize()
          intializes the Reader and Searcher
 DeguHits search(java.lang.String queryString, int begin, int end)
          performs search on the document index
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static org.apache.log4j.Logger logger

MAX_BYTES_TO_ANALYZE

private static final int MAX_BYTES_TO_ANALYZE
See Also:
Constant Field Values

MAX_BEST_FRAGMENTS

private static final int MAX_BEST_FRAGMENTS
See Also:
Constant Field Values

MAX_HITS

private static final int MAX_HITS
See Also:
Constant Field Values

FRAGMENT_SIZE

private static final int FRAGMENT_SIZE
See Also:
Constant Field Values

idxDesc

private LuceneIndexDescriptor idxDesc

indexReader

private org.apache.lucene.index.IndexReader indexReader

indexSearcher

private org.apache.lucene.search.IndexSearcher indexSearcher

analyzer

private org.apache.lucene.analysis.Analyzer analyzer

queryParser

private org.apache.lucene.queryParser.QueryParser queryParser

pageQueryParser

private org.apache.lucene.queryParser.QueryParser pageQueryParser

scorer

private org.apache.lucene.search.highlight.Scorer scorer

formatter

private org.apache.lucene.search.highlight.Formatter formatter

fragmenter

private org.apache.lucene.search.highlight.SimpleFragmenter fragmenter

high

private org.apache.lucene.search.highlight.Highlighter high
Constructor Detail

PageIndexSearcher

public PageIndexSearcher(LuceneIndexDescriptor idxDesc)
ctor

Parameters:
docIdxDesc - information like index path, used analyzer etc.
Method Detail

intitialize

public void intitialize()
                 throws java.io.IOException
intializes the Reader and Searcher

Throws:
java.io.IOException

search

public DeguHits search(java.lang.String queryString,
                       int begin,
                       int end)
                throws org.apache.lucene.queryParser.ParseException,
                       java.io.IOException
performs search on the document index

Parameters:
queryString - a query
Returns:
DeguHits
Throws:
org.apache.lucene.queryParser.ParseException
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException