📄 analyzer.html
字号:
<TD><CODE><B><A HREF="../../../../../org/apache/lucene/index/IndexWriter.html#IndexWriter(org.apache.lucene.store.Directory, org.apache.lucene.analysis.Analyzer, boolean)">IndexWriter</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A> d, <A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A> a, boolean create)</CODE>
<BR>
Constructs an IndexWriter for the index in <code>d</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/lucene/index/IndexWriter.html#IndexWriter(java.lang.String, org.apache.lucene.analysis.Analyzer)">IndexWriter</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> path, <A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A> a)</CODE>
<BR>
Constructs an IndexWriter for the index in <code>path</code>, creating it first if it does not already exist, otherwise appending to the existing index.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/lucene/index/IndexWriter.html#IndexWriter(java.io.File, org.apache.lucene.analysis.Analyzer)">IndexWriter</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A> path, <A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A> a)</CODE>
<BR>
Constructs an IndexWriter for the index in <code>path</code>, creating it first if it does not already exist, otherwise appending to the existing index.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/lucene/index/IndexWriter.html#IndexWriter(org.apache.lucene.store.Directory, org.apache.lucene.analysis.Analyzer)">IndexWriter</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A> d, <A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A> a)</CODE>
<BR>
Constructs an IndexWriter for the index in <code>d</code>, creating it first if it does not already exist, otherwise appending to the existing index.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/lucene/index/IndexModifier.html#IndexModifier(org.apache.lucene.store.Directory, org.apache.lucene.analysis.Analyzer, boolean)">IndexModifier</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A> directory, <A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A> analyzer, boolean create)</CODE>
<BR>
Open an index with write access.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/lucene/index/IndexModifier.html#IndexModifier(java.lang.String, org.apache.lucene.analysis.Analyzer, boolean)">IndexModifier</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> dirName, <A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A> analyzer, boolean create)</CODE>
<BR>
Open an index with write access.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/lucene/index/IndexModifier.html#IndexModifier(java.io.File, org.apache.lucene.analysis.Analyzer, boolean)">IndexModifier</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A> file, <A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A> analyzer, boolean create)</CODE>
<BR>
Open an index with write access.</TD>
</TR>
</TABLE>
<P>
<A NAME="org.apache.lucene.index.memory"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
Uses of <A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A> in <A HREF="../../../../../org/apache/lucene/index/memory/package-summary.html">org.apache.lucene.index.memory</A></FONT></TD>
</TR>
</TABLE>
<P>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
<TD COLSPAN=2>Subclasses of <A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A> in <A HREF="../../../../../org/apache/lucene/index/memory/package-summary.html">org.apache.lucene.index.memory</A></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/lucene/index/memory/PatternAnalyzer.html" title="class in org.apache.lucene.index.memory">PatternAnalyzer</A></B></CODE>
<BR>
Efficient Lucene analyzer/tokenizer that preferably operates on a String rather than a <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/Reader.html" title="class or interface in java.io"><CODE>Reader</CODE></A>, that can flexibly separate text into terms via a regular expression <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/regex/Pattern.html" title="class or interface in java.util.regex"><CODE>Pattern</CODE></A> (with behaviour identical to <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html#split(java.lang.String)" title="class or interface in java.lang"><CODE>String.split(String)</CODE></A>), and that combines the functionality of <A HREF="../../../../../org/apache/lucene/analysis/LetterTokenizer.html" title="class in org.apache.lucene.analysis"><CODE>LetterTokenizer</CODE></A>, <A HREF="../../../../../org/apache/lucene/analysis/LowerCaseTokenizer.html" title="class in org.apache.lucene.analysis"><CODE>LowerCaseTokenizer</CODE></A>, <A HREF="../../../../../org/apache/lucene/analysis/WhitespaceTokenizer.html" title="class in org.apache.lucene.analysis"><CODE>WhitespaceTokenizer</CODE></A>, <A HREF="../../../../../org/apache/lucene/analysis/StopFilter.html" title="class in org.apache.lucene.analysis"><CODE>StopFilter</CODE></A> into a single efficient multi-purpose class.</TD>
</TR>
</TABLE>
<P>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
<TD COLSPAN=2>Methods in <A HREF="../../../../../org/apache/lucene/index/memory/package-summary.html">org.apache.lucene.index.memory</A> that return <A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A></CODE></FONT></TD>
<TD><CODE><B>AnalyzerUtil.</B><B><A HREF="../../../../../org/apache/lucene/index/memory/AnalyzerUtil.html#getLoggingAnalyzer(org.apache.lucene.analysis.Analyzer, java.io.PrintStream, java.lang.String)">getLoggingAnalyzer</A></B>(<A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A> child, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/PrintStream.html" title="class or interface in java.io">PrintStream</A> log, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> logName)</CODE>
<BR>
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.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A></CODE></FONT></TD>
<TD><CODE><B>AnalyzerUtil.</B><B><A HREF="../../../../../org/apache/lucene/index/memory/AnalyzerUtil.html#getMaxTokenAnalyzer(org.apache.lucene.analysis.Analyzer, int)">getMaxTokenAnalyzer</A></B>(<A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A> child, int maxTokens)</CODE>
<BR>
Returns an analyzer wrapper that returns at most the first <code>maxTokens</code> tokens from the underlying child analyzer, ignoring all remaining tokens.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A></CODE></FONT></TD>
<TD><CODE><B>AnalyzerUtil.</B><B><A HREF="../../../../../org/apache/lucene/index/memory/AnalyzerUtil.html#getPorterStemmerAnalyzer(org.apache.lucene.analysis.Analyzer)">getPorterStemmerAnalyzer</A></B>(<A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A> child)</CODE>
<BR>
Returns an English stemming analyzer that stems tokens from the underlying child analyzer according to the Porter stemming algorithm.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A></CODE></FONT></TD>
<TD><CODE><B>AnalyzerUtil.</B><B><A HREF="../../../../../org/apache/lucene/index/memory/AnalyzerUtil.html#getSynonymAnalyzer(org.apache.lucene.analysis.Analyzer, org.apache.lucene.index.memory.SynonymMap, int)">getSynonymAnalyzer</A></B>(<A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A> child, <A HREF="../../../../../org/apache/lucene/index/memory/SynonymMap.html" title="class in org.apache.lucene.index.memory">SynonymMap</A> synonyms, int maxSynonyms)</CODE>
<BR>
Returns an analyzer wrapper that wraps the underlying child analyzer's token stream into a <A HREF="../../../../../org/apache/lucene/index/memory/SynonymTokenFilter.html" title="class in org.apache.lucene.index.memory"><CODE>SynonymTokenFilter</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A></CODE></FONT></TD>
<TD><CODE><B>AnalyzerUtil.</B><B><A HREF="../../../../../org/apache/lucene/index/memory/AnalyzerUtil.html#getTokenCachingAnalyzer(org.apache.lucene.analysis.Analyzer)">getTokenCachingAnalyzer</A></B>(<A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A> child)</CODE>
<BR>
Returns an analyzer wrapper that caches all tokens generated by the underlying child analyzer's token streams, and delivers those cached tokens on subsequent calls to <code>tokenStream(String fieldName, Reader reader)</code> if the fieldName has been seen before, altogether ignoring the Reader parameter on cache lookup.</TD>
</TR>
</TABLE>
<P>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
<TD COLSPAN=2>Methods in <A HREF="../../../../../org/apache/lucene/index/memory/package-summary.html">org.apache.lucene.index.memory</A> with parameters of type <A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B>MemoryIndex.</B><B><A HREF="../../../../../org/apache/lucene/index/memory/MemoryIndex.html#addField(java.lang.String, java.lang.String, org.apache.lucene.analysis.Analyzer)">addField</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> fieldName, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> text, <A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A> analyzer)</CODE>
<BR>
Convenience method; Tokenizes the given field text and adds the resulting terms to the index; Equivalent to adding an indexed non-keyword Lucene <A HREF="../../../../../org/apache/lucene/document/Field.html" title="class in org.apache.lucene.document"><CODE>Field</CODE></A> that is <A HREF="../../../../../org/apache/lucene/document/Field.Index.html#TOKENIZED"><CODE>tokenized</CODE></A>, <A HREF="../../../../../org/apache/lucene/document/Field.Store.html#NO"><CODE>not stored</CODE></A>, <A HREF="../../../../../org/apache/lucene/document/Field.TermVector.html#WITH_POSITIONS"><CODE>termVectorStored with positions</CODE></A> (or <A HREF="../../../../../org/apache/lucene/document/Field.TermVector.html#WITH_POSITIONS"><CODE>termVectorStored with positions and offsets</CODE></A>),</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A></CODE></FONT></TD>
<TD><CODE><B>AnalyzerUtil.</B><B><A HREF="../../../../../org/apache/lucene/index/memory/AnalyzerUtil.html#getLoggingAnalyzer(org.apache.lucene.analysis.Analyzer, java.io.PrintStream, java.lang.String)">getLoggingAnalyzer</A></B>(<A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A> child, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/PrintStream.html" title="class or interface in java.io">PrintStream</A> log, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> logName)</CODE>
<BR>
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.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A></CODE></FONT></TD>
<TD><CODE><B>AnalyzerUtil.</B><B><A HREF="../../../../../org/apache/lucene/index/memory/AnalyzerUtil.html#getMaxTokenAnalyzer(org.apache.lucene.analysis.Analyzer, int)">getMaxTokenAnalyzer</A></B>(<A HREF="../../../../../org/apache/lucene/analysis/Analyzer.h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -