Lucene provides a base class org.apache.lucene.analysis.Analyzer
that you can use if you want to write your own parser.
You can check the class org.apache.lucene.analysis.standard.StandardAnalyzer
that extends Analyzer.
YourAnalyzer StandardAnalyzer SnowballAnalyzer, , , :
TokenStream result = new StandardFilter(tokenStream);
result = new SnowballFilter(result, stopSet);
IndexWriter Analyzer, Standard Snowball.
:
, . Solr.
, SearchComponent SolrConfig.xml, :
<searchComponent name="yourQueryComponent" class="org.apache.solr.handler.component.YourQueryComponent"/>
( ), SearchHandler SolrConfig.xml:
<requestHandler name="YourRequestHandlerName" class="org.apache.solr.handler.component.YourRequestHandler" default="true">
<lst name="defaults">
<str name="echoParams">explicit</str>
<int name="rows">1000</int>
<str name="fl">*</str>
<str name="version">2.1</str>
</lst>
<arr name="components">
<str>yourQueryComponent</str>
<str>facet</str>
<str>mlt</str>
<str>highlight</str>
<str>stats</str>
<str>debug</str>
</arr>
</requestHandler>
, url- Solr, qt = YourRequestHandlerName, , .
SearchComponents.
RequestHandlers.