Lucene.net PerFieldAnalyzerWrapper - Controlling Index Version -
Lucene.net PerFieldAnalyzerWrapper - Controlling Index Version -
we utilize mill build lucene analyzers in consistent fashion, , we've sort of reached tipping point.
analyzer construction looked this:
public analyzer construct(string[] keywordfields) { var analyzer = new perfieldanalyzerwrapper(new standardanalyzer(lucene.net.util.version.lucene_30)); var keywordanalyzer = new keywordanalyzer(); foreach (var field in keywordfields) { analyzer.addanalyzer(field, keywordanalyzer); } homecoming analyzer; }
we've reached point makes more sense default keyword analyzer, , specify fields want utilize tokenizing analyzer on, eg:
public analyzer construct(string[] nonkeywordfields) { var analyzer = new perfieldanalyzerwrapper(new keywordanalyzer()); var fulltextanalyzer = new standardanalyzer(lucene.net.util.version.lucene_30); foreach (var field in nonkeywordfields) { analyzer.addanalyzer(field, fulltextanalyzer); } homecoming analyzer; }
i noticed when looking @ index luke approach changes index version lucene 3 lucene 2.9, may or may not issue (probably not).
it still has me curious though - far know way command index version through analyzer passed index author - there improve way? if not, i'm wondering if there way command version if default analyzer keywordanalyzer?
lucene.net
Comments
Post a Comment