Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/**
* This file is part of Graylog.
*
* Graylog is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Graylog is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Graylog. If not, see .
*/
package org.graylog2.indexer;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import org.graylog2.plugin.Message;
import java.util.List;
import java.util.Map;
public class IndexMapping6 extends IndexMapping {
@Override
public Map messageTemplate(final String template, final String analyzer,
final int order) {
final Map analyzerKeyword = ImmutableMap
.of("analyzer_keyword", ImmutableMap.of(
"tokenizer", "keyword",
"filter", "lowercase"));
final Map analysis = ImmutableMap.of("analyzer", analyzerKeyword);
final Map settings = ImmutableMap.of("analysis", analysis);
final Map mappings = ImmutableMap.of(IndexMapping.TYPE_MESSAGE, messageMapping(analyzer));
return ImmutableMap.of(
"template", template,
"order", order,
"settings", settings,
"mappings", mappings
);
}
protected List