Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP First draft for version field #58256

Closed
wants to merge 21 commits into from
Closed
Prev Previous commit
Next Next commit
Start moving stuff to xpack
  • Loading branch information
Christoph Büscher committed Jun 26, 2020
commit 9fe2fc9fd195f9904ac21363789e1e8b3227a596
18 changes: 18 additions & 0 deletions x-pack/plugin/versionfield/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
evaluationDependsOn(xpackModule('core'))

apply plugin: 'elasticsearch.esplugin'

esplugin {
name 'versionfield'
description 'A plugin for a field type to store sofware versions'
classname 'org.elasticsearch.xpack.versionfield.VersionFieldPlugin'
extendedPlugins = ['x-pack-core']
}
archivesBaseName = 'x-pack-versionfield'

dependencies {
compileOnly project(path: xpackModule('core'), configuration: 'default')
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
}

integTest.enabled = false
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

package org.elasticsearch.xpack.versionfield;

import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.mapper.Mapper;
import org.elasticsearch.plugins.MapperPlugin;
import org.elasticsearch.plugins.Plugin;

import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;

public class VersionFieldPlugin extends Plugin implements MapperPlugin {


public VersionFieldPlugin(Settings settings) {
}

@Override
public Map<String, Mapper.TypeParser> getMappers() {
Map<String, Mapper.TypeParser> mappers = new LinkedHashMap<>();
//mappers.put(WildcardFieldMapper.CONTENT_TYPE, new WildcardFieldMapper.TypeParser());
return Collections.unmodifiableMap(mappers);
}
}