lucene 4.3.0 を使用しており、ドキュメントを英語と日本語の両方の文字でトークン化したいと考えています。
An example is like "LEICA S2 カタログ (新品)"
The StandardAnalyzer "[leica] [s2] [カタログ] [新] [品]"
The JapaneseAnalyzer "[leica] [s] [2] [カタログ] [新品]"
私のプロジェクトのアプリケーションでは、StandardAnalyzer は英語の文字に優れています。たとえば、[s2] は [s] [2] よりも優れています。JapaneseAnalyzer は、[新品] から [新] [品] などの日本語に適しています。また、JapaneseAnalyzerには全角文字「2」を「2」に変換する優れた機能があります。
If I want the tokens to be [leica] [s2] [カタログ] [新品], it means:
1) English and numbers are tokenized by StandardAnalyzer. [leica] [s2]
2) Japanese are tokenized by JapaneseAnalyzer. [カタログ] [新品]
3) fullwidth character are converted to halfwidth by a filter. [s2]=>[s2]
how to implement this custom analyzer?