Package | Description |
---|---|
org.apache.lucene.analysis |
API and code to convert text into indexable tokens.
|
org.apache.lucene.analysis.br |
Analyzer for Brazilian.
|
org.apache.lucene.analysis.cjk |
Analyzer for Chinese, Japanese and Korean.
|
org.apache.lucene.analysis.cn |
Analyzer for Chinese.
|
org.apache.lucene.analysis.cz |
Analyzer for Czech.
|
org.apache.lucene.analysis.de |
Analyzer for German.
|
org.apache.lucene.analysis.el |
Analyzer for Greek.
|
org.apache.lucene.analysis.fr |
Analyzer for French.
|
org.apache.lucene.analysis.nl |
Analyzer for Dutch.
|
org.apache.lucene.analysis.ru |
Analyzer for Russian.
|
org.apache.lucene.analysis.snowball |
TokenFilter and Analyzer implementations that use Snowball
stemmers. |
org.apache.lucene.analysis.standard |
A grammar-based tokenizer constructed with JavaCC.
|
org.apache.lucene.index |
Code to maintain and access indices.
|
org.apache.lucene.index.memory |
High-performance single-document main memory Apache Lucene fulltext search index.
|
org.apache.lucene.queryParser |
A simple query parser implemented with JavaCC.
|
org.apache.lucene.queryParser.analyzing | |
org.apache.lucene.queryParser.precedence | |
org.apache.lucene.search |
Search over indices.
|
org.apache.lucene.search.highlight |
The highlight package contains classes to provide "keyword in context" features
typically used to highlight search terms in the text of results pages.
|
org.apache.lucene.search.similar |
Document similarity query generators.
|
org.apache.lucene.swing.models |
Decorators for JTable TableModel and JList ListModel encapsulating Lucene indexing and searching functionality.
|
org.apache.lucene.wordnet |
This package uses synonyms defined by WordNet to build a
Lucene index storing them, which in turn can be used for query expansion.
|
Modifier and Type | Class and Description |
---|---|
class |
KeywordAnalyzer
"Tokenizes" the entire stream as a single token.
|
class |
PerFieldAnalyzerWrapper
This analyzer is used to facilitate scenarios where different
fields require different analysis techniques.
|
class |
SimpleAnalyzer
An Analyzer that filters LetterTokenizer with LowerCaseFilter.
|
class |
StopAnalyzer
Filters LetterTokenizer with LowerCaseFilter and StopFilter.
|
class |
WhitespaceAnalyzer
An Analyzer that uses WhitespaceTokenizer.
|
Modifier and Type | Method and Description |
---|---|
void |
PerFieldAnalyzerWrapper.addAnalyzer(String fieldName,
Analyzer analyzer)
Defines an analyzer to use for the specified field.
|
Constructor and Description |
---|
PerFieldAnalyzerWrapper(Analyzer defaultAnalyzer)
Constructs with default analyzer.
|
Modifier and Type | Class and Description |
---|---|
class |
BrazilianAnalyzer
Analyzer for Brazilian language.
|
Modifier and Type | Class and Description |
---|---|
class |
CJKAnalyzer
Filters CJKTokenizer with StopFilter.
|
Modifier and Type | Class and Description |
---|---|
class |
ChineseAnalyzer
Title: ChineseAnalyzer
Description:
Subclass of org.apache.lucene.analysis.Analyzer
build from a ChineseTokenizer, filtered with ChineseFilter.
|
Modifier and Type | Class and Description |
---|---|
class |
CzechAnalyzer
Analyzer for Czech language.
|
Modifier and Type | Class and Description |
---|---|
class |
GermanAnalyzer
Analyzer for German language.
|
Modifier and Type | Class and Description |
---|---|
class |
GreekAnalyzer
Analyzer for the Greek language.
|
Modifier and Type | Class and Description |
---|---|
class |
FrenchAnalyzer
Analyzer for French language.
|
Modifier and Type | Class and Description |
---|---|
class |
DutchAnalyzer
Analyzer for Dutch language.
|
Modifier and Type | Class and Description |
---|---|
class |
RussianAnalyzer
Analyzer for Russian language.
|
Modifier and Type | Class and Description |
---|---|
class |
SnowballAnalyzer
|
Modifier and Type | Class and Description |
---|---|
class |
StandardAnalyzer
Filters
StandardTokenizer with StandardFilter , LowerCaseFilter and StopFilter , using a list of English stop words. |
Modifier and Type | Field and Description |
---|---|
protected Analyzer |
IndexModifier.analyzer |
Modifier and Type | Method and Description |
---|---|
Analyzer |
IndexWriter.getAnalyzer()
Returns the analyzer used by this index.
|
Modifier and Type | Method and Description |
---|---|
void |
IndexModifier.addDocument(Document doc,
Analyzer docAnalyzer)
Adds a document to this index, using the provided analyzer instead of the
one specific in the constructor.
|
void |
IndexWriter.addDocument(Document doc,
Analyzer analyzer)
Adds a document to this index, using the provided analyzer instead of the
value of
IndexWriter.getAnalyzer() . |
protected void |
IndexModifier.init(Directory directory,
Analyzer analyzer,
boolean create)
Initialize an IndexWriter.
|
Constructor and Description |
---|
IndexModifier(Directory directory,
Analyzer analyzer,
boolean create)
Open an index with write access.
|
IndexModifier(File file,
Analyzer analyzer,
boolean create)
Open an index with write access.
|
IndexModifier(String dirName,
Analyzer analyzer,
boolean create)
Open an index with write access.
|
IndexWriter(Directory d,
Analyzer a,
boolean create)
Constructs an IndexWriter for the index in
d . |
IndexWriter(File path,
Analyzer a,
boolean create)
Constructs an IndexWriter for the index in
path . |
IndexWriter(String path,
Analyzer a,
boolean create)
Constructs an IndexWriter for the index in
path . |
Modifier and Type | Class and Description |
---|---|
class |
PatternAnalyzer
Efficient Lucene analyzer/tokenizer that preferably operates on a String rather than a
Reader , that can flexibly separate text into terms via a regular expression Pattern
(with behaviour identical to String.split(String) ),
and that combines the functionality of
LetterTokenizer ,
LowerCaseTokenizer ,
WhitespaceTokenizer ,
StopFilter into a single efficient
multi-purpose class. |
Modifier and Type | Method and Description |
---|---|
static Analyzer |
AnalyzerUtil.getLoggingAnalyzer(Analyzer child,
PrintStream log,
String logName)
Returns a simple analyzer wrapper that logs all tokens produced by the
underlying child analyzer to the given log stream (typically System.err);
Otherwise behaves exactly like the child analyzer, delivering the very
same tokens; useful for debugging purposes on custom indexing and/or
querying.
|
static Analyzer |
AnalyzerUtil.getMaxTokenAnalyzer(Analyzer child,
int maxTokens)
Returns an analyzer wrapper that returns at most the first
maxTokens tokens from the underlying child analyzer,
ignoring all remaining tokens. |
static Analyzer |
AnalyzerUtil.getPorterStemmerAnalyzer(Analyzer child)
Returns an English stemming analyzer that stems tokens from the
underlying child analyzer according to the Porter stemming algorithm.
|
static Analyzer |
AnalyzerUtil.getSynonymAnalyzer(Analyzer child,
SynonymMap synonyms,
int maxSynonyms)
Returns an analyzer wrapper that wraps the underlying child analyzer's
token stream into a
SynonymTokenFilter . |
Modifier and Type | Method and Description |
---|---|
void |
MemoryIndex.addField(String fieldName,
String text,
Analyzer analyzer)
Convenience method; Tokenizes the given field text and adds the resulting
terms to the index; Equivalent to adding a tokenized, indexed,
termVectorStored, unstored, non-keyword Lucene
Field . |
static Analyzer |
AnalyzerUtil.getLoggingAnalyzer(Analyzer child,
PrintStream log,
String logName)
Returns a simple analyzer wrapper that logs all tokens produced by the
underlying child analyzer to the given log stream (typically System.err);
Otherwise behaves exactly like the child analyzer, delivering the very
same tokens; useful for debugging purposes on custom indexing and/or
querying.
|
static Analyzer |
AnalyzerUtil.getMaxTokenAnalyzer(Analyzer child,
int maxTokens)
Returns an analyzer wrapper that returns at most the first
maxTokens tokens from the underlying child analyzer,
ignoring all remaining tokens. |
static String[] |
AnalyzerUtil.getMostFrequentTerms(Analyzer analyzer,
String text,
int limit)
Returns (frequency:term) pairs for the top N distinct terms (aka words),
sorted descending by frequency (and ascending by term, if tied).
|
static Analyzer |
AnalyzerUtil.getPorterStemmerAnalyzer(Analyzer child)
Returns an English stemming analyzer that stems tokens from the
underlying child analyzer according to the Porter stemming algorithm.
|
static Analyzer |
AnalyzerUtil.getSynonymAnalyzer(Analyzer child,
SynonymMap synonyms,
int maxSynonyms)
Returns an analyzer wrapper that wraps the underlying child analyzer's
token stream into a
SynonymTokenFilter . |
Modifier and Type | Method and Description |
---|---|
Analyzer |
QueryParser.getAnalyzer() |
Modifier and Type | Method and Description |
---|---|
protected Query |
MultiFieldQueryParser.getFieldQuery(String field,
Analyzer analyzer,
String queryText)
Deprecated.
|
protected Query |
QueryParser.getFieldQuery(String field,
Analyzer analyzer,
String queryText)
Deprecated.
|
protected Query |
QueryParser.getFieldQuery(String field,
Analyzer analyzer,
String queryText,
int slop)
Deprecated.
|
protected Query |
MultiFieldQueryParser.getRangeQuery(String field,
Analyzer analyzer,
String part1,
String part2,
boolean inclusive)
|
protected Query |
QueryParser.getRangeQuery(String field,
Analyzer analyzer,
String part1,
String part2,
boolean inclusive)
Deprecated.
|
static Query |
MultiFieldQueryParser.parse(String[] queries,
String[] fields,
Analyzer analyzer)
Parses a query which searches on the fields specified.
|
static Query |
MultiFieldQueryParser.parse(String[] queries,
String[] fields,
BooleanClause.Occur[] flags,
Analyzer analyzer)
Parses a query, searching on the fields specified.
|
static Query |
MultiFieldQueryParser.parse(String[] queries,
String[] fields,
int[] flags,
Analyzer analyzer)
Deprecated.
|
static Query |
MultiFieldQueryParser.parse(String query,
String[] fields,
Analyzer analyzer)
Deprecated.
use
QueryParser.parse(String) instead but note that it
returns a different query for queries where all terms are required:
its query excepts all terms, no matter in what field they occur whereas
the query built by this (deprecated) method expected all terms in all fields
at the same time. |
static Query |
MultiFieldQueryParser.parse(String query,
String[] fields,
BooleanClause.Occur[] flags,
Analyzer analyzer)
Parses a query, searching on the fields specified.
|
static Query |
MultiFieldQueryParser.parse(String query,
String[] fields,
int[] flags,
Analyzer analyzer)
Deprecated.
|
static Query |
QueryParser.parse(String query,
String field,
Analyzer analyzer)
Deprecated.
Use an instance of QueryParser and the
QueryParser.parse(String) method instead. |
Constructor and Description |
---|
MultiFieldQueryParser(String[] fields,
Analyzer analyzer)
Creates a MultiFieldQueryParser.
|
MultiFieldQueryParser(String f,
Analyzer a)
Deprecated.
|
QueryParser(String f,
Analyzer a)
Constructs a query parser.
|
Constructor and Description |
---|
AnalyzingQueryParser(String field,
Analyzer analyzer)
Constructs a query parser.
|
Modifier and Type | Method and Description |
---|---|
Analyzer |
PrecedenceQueryParser.getAnalyzer() |
Constructor and Description |
---|
PrecedenceQueryParser(String f,
Analyzer a)
Constructs a query parser.
|
Constructor and Description |
---|
QueryTermVector(String queryString,
Analyzer analyzer) |
Modifier and Type | Method and Description |
---|---|
static TokenStream |
TokenSources.getAnyTokenStream(IndexReader reader,
int docId,
String field,
Analyzer analyzer)
A convenience method that tries a number of approaches to getting a token stream.
|
String |
Highlighter.getBestFragment(Analyzer analyzer,
String fieldName,
String text)
Highlights chosen terms in a text, extracting the most relevant section.
|
String[] |
Highlighter.getBestFragments(Analyzer analyzer,
String text,
int maxNumFragments)
Highlights chosen terms in a text, extracting the most relevant sections.
|
static TokenStream |
TokenSources.getTokenStream(IndexReader reader,
int docId,
String field,
Analyzer analyzer) |
Modifier and Type | Field and Description |
---|---|
static Analyzer |
MoreLikeThis.DEFAULT_ANALYZER
Default analyzer to parse source doc with.
|
Modifier and Type | Method and Description |
---|---|
Analyzer |
MoreLikeThis.getAnalyzer()
Returns an analyzer that will be used to parse source doc with.
|
Modifier and Type | Method and Description |
---|---|
static Query |
SimilarityQueries.formSimilarQuery(String body,
Analyzer a,
String field,
Set stop)
Simple similarity query generators.
|
void |
MoreLikeThis.setAnalyzer(Analyzer analyzer)
Sets the analyzer to use.
|
Modifier and Type | Method and Description |
---|---|
Analyzer |
ListSearcher.getAnalyzer() |
Analyzer |
TableSearcher.getAnalyzer() |
Modifier and Type | Method and Description |
---|---|
void |
ListSearcher.setAnalyzer(Analyzer analyzer) |
void |
TableSearcher.setAnalyzer(Analyzer analyzer) |
Modifier and Type | Method and Description |
---|---|
static Query |
SynExpand.expand(String query,
Searcher syns,
Analyzer a,
String field,
float boost)
Perform synonym expansion on a query.
|
static Query |
SynLookup.expand(String query,
Searcher syns,
Analyzer a,
String field,
float boost)
Perform synonym expansion on a query.
|
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.