All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.elasticsearch.plugin.nlpcn.SqlPlug Maven / Gradle / Ivy

The newest version!
package org.elasticsearch.plugin.nlpcn;

import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.common.settings.ClusterSettings;
import org.elasticsearch.common.settings.IndexScopedSettings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.settings.SettingsFilter;
import org.elasticsearch.plugins.ActionPlugin;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.rest.RestController;
import org.elasticsearch.rest.RestHandler;

import java.util.Collections;
import java.util.List;
import java.util.function.Supplier;

public class SqlPlug extends Plugin implements ActionPlugin {

	public SqlPlug() {
	}


	public String name() {
		return "sql";
	}

	public String description() {
		return "Use sql to query elasticsearch.";
	}


	@Override
	public List getRestHandlers(Settings settings, RestController restController, ClusterSettings clusterSettings, IndexScopedSettings indexScopedSettings, SettingsFilter settingsFilter, IndexNameExpressionResolver indexNameExpressionResolver, Supplier nodesInCluster) {
		return Collections.singletonList(new RestSqlAction(settings, restController));
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy