Example usage for org.apache.lucene.analysis.standard StandardAnalyzer DEFAULT_MAX_TOKEN_LENGTH

List of usage examples for org.apache.lucene.analysis.standard StandardAnalyzer DEFAULT_MAX_TOKEN_LENGTH

Introduction

In this page you can find the example usage for org.apache.lucene.analysis.standard StandardAnalyzer DEFAULT_MAX_TOKEN_LENGTH.

Prototype

int DEFAULT_MAX_TOKEN_LENGTH

To view the source code for org.apache.lucene.analysis.standard StandardAnalyzer DEFAULT_MAX_TOKEN_LENGTH.

Click Source Link

Document

Default maximum allowed token length

Usage

From source file:com.colinsurprenant.fastfuzzy.TwitterTokenizerFactory.java

License:Apache License

/** Creates a new TwitterTokenizerFactory */
public TwitterTokenizerFactory(Map<String, String> args) {
    super(args);//from  w w  w  . j  av a2  s  .  c  o  m
    maxTokenLength = getInt(args, "maxTokenLength", StandardAnalyzer.DEFAULT_MAX_TOKEN_LENGTH);
    if (!args.isEmpty()) {
        throw new IllegalArgumentException("Unknown parameters: " + args);
    }
}

From source file:elhuyar.bilakit.ElhuyarLemmatizerTokenizerFactory.java

License:Open Source License

/** Creates a new BasqueLemmatizerTokenizerFactory */
public ElhuyarLemmatizerTokenizerFactory(Map<String, String> args) {
    super(args);// w ww.j  ava  2  s.  com

    if (args.containsKey("lang")) {
        this.lang = get(args, "lang");
    } else {
        this.lang = "es";
    }
    if (args.containsKey("lemmatizer")) {
        this.lemmatizer = get(args, "lemmatizer");
    } else {
        this.lemmatizer = "";
    }

    maxTokenLength = getInt(args, "maxTokenLength", StandardAnalyzer.DEFAULT_MAX_TOKEN_LENGTH);
    if (!args.isEmpty()) {
        throw new IllegalArgumentException("Unknown parameters: " + args);
    }
}

From source file:jp.co.atware.solr.analizers.cjk.CJKTokenizerFactory.java

License:Apache License

public CJKTokenizerFactory(Map<String, String> args) {
    super(args);/*from  ww w .  ja  v a  2s .c  o  m*/
    maxTokenLength = getInt(args, "maxTokenLength", StandardAnalyzer.DEFAULT_MAX_TOKEN_LENGTH);
    if (args.containsKey(CUSTOMIZE_DFA_KEY)) {
        if (!args.containsKey(CMAP_FILE_PATH_KEY) || !args.containsKey(ACTION_FILE_PATH_KEY)
                || !args.containsKey(TRANS_FILE_PATH_KEY)) {
            throw new IllegalArgumentException("Configuration Error: dfa setting file path");
        }
        cmap = dfaManager.getCMap(args.get(CMAP_FILE_PATH_KEY));
        action = dfaManager.getAction(args.get(ACTION_FILE_PATH_KEY));
        trans = dfaManager.getTrans(args.get(TRANS_FILE_PATH_KEY));
    }
}

From source file:jp.co.mixi.rd.lucene.analysis.StandardPlusTokenizerFactory.java

License:Apache License

/** Creates a new StandardTokenizerFactory */
public StandardPlusTokenizerFactory(Map<String, String> args) {
    super(args);/*  w  w  w. j av  a 2  s  .  co m*/
    maxTokenLength = getInt(args, "maxTokenLength", StandardAnalyzer.DEFAULT_MAX_TOKEN_LENGTH);
    if (!args.isEmpty()) {
        throw new IllegalArgumentException("Unknown parameters: " + args);
    }
}

From source file:org.apache.solr.analysis.ClassicTokenizerFactory.java

License:Apache License

@Override
public void init(Map<String, String> args) {
    super.init(args);
    assureMatchVersion();// www.ja v a  2  s  . co  m
    maxTokenLength = getInt("maxTokenLength", StandardAnalyzer.DEFAULT_MAX_TOKEN_LENGTH);
}

From source file:org.elasticsearch.analysis.common.ClassicTokenizerFactory.java

License:Apache License

ClassicTokenizerFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) {
    super(indexSettings, settings);
    maxTokenLength = settings.getAsInt("max_token_length", StandardAnalyzer.DEFAULT_MAX_TOKEN_LENGTH);
}

From source file:org.elasticsearch.analysis.common.UAX29URLEmailTokenizerFactory.java

License:Apache License

UAX29URLEmailTokenizerFactory(IndexSettings indexSettings, Environment environment, String name,
        Settings settings) {/*from   w  ww .  j  av a2  s  .  c o m*/
    super(indexSettings, settings);
    maxTokenLength = settings.getAsInt("max_token_length", StandardAnalyzer.DEFAULT_MAX_TOKEN_LENGTH);
}

From source file:org.elasticsearch.analysis.common.WhitespaceTokenizerFactory.java

License:Apache License

WhitespaceTokenizerFactory(IndexSettings indexSettings, Environment environment, String name,
        Settings settings) {//from   w  w  w.  j  a v  a 2 s.c  o  m
    super(indexSettings, settings);
    maxTokenLength = settings.getAsInt(MAX_TOKEN_LENGTH, StandardAnalyzer.DEFAULT_MAX_TOKEN_LENGTH);
}

From source file:org.elasticsearch.index.analysis.ClassicTokenizerFactory.java

License:Apache License

@Inject
public ClassicTokenizerFactory(Index index, IndexSettingsService indexSettingsService, @Assisted String name,
        @Assisted Settings settings) {//from  w w  w. j ava2s .c  om
    super(index, indexSettingsService.getSettings(), name, settings);
    maxTokenLength = settings.getAsInt("max_token_length", StandardAnalyzer.DEFAULT_MAX_TOKEN_LENGTH);
}

From source file:org.elasticsearch.index.analysis.ExtensibleStandardTokenizerFactory.java

License:Apache License

@Inject
public ExtensibleStandardTokenizerFactory(Index index, IndexSettingsService indexSettingsService,
        @Assisted String name, @Assisted Settings settings) {
    super(index, indexSettingsService.getSettings(), name, settings);
    maxTokenLength = settings.getAsInt("max_token_length", StandardAnalyzer.DEFAULT_MAX_TOKEN_LENGTH);
}