Package org.elasticsearch.script

Support for running user provided scripts (in the request, in cluster state, etc) in portions of various requests (FunctionScoreQueryAggregationUpdateAction, etc).
Interface Summary
Interface Description
ExecutableScript
An executable script, can't be used concurrently.
ExplainableSearchScript
To be implemented by SearchScript which can provided an Explanation of the score This is currently not used inside elasticsearch but it is used, see for example here: https://github.com/elastic/elasticsearch/issues/8561
LeafSearchScript
A per-segment SearchScript.
NativeScriptFactory Deprecated

Create a ScriptEngineService instead of using native scripts
ScriptContext
Context of an operation that uses scripts as part of its execution.
ScriptEngineService  
SearchScript
A search script.
Class Summary
Class Description
AbstractDoubleSearchScript
A simpler base class instead of AbstractSearchScript for computations that return a double number.
AbstractExecutableScript
AbstractLongSearchScript
A simpler base class instead of AbstractSearchScript for computations that return a long number.
AbstractSearchScript
A base class for any script type that is used during the search process (custom score, aggs, and so on).
ClassPermission
Checked by scripting engines to allow loading a java class.
CompiledScript
CompiledScript holds all the parameters necessary to execute a previously compiled script.
NativeScriptEngineService
A native script engine service.
ScoreAccessor
A float encapsulation that dynamically accesses the score of a document.
Script
Script represents used-defined input that can be used to compile and execute a script from the ScriptService based on the ScriptType.
ScriptContext.Plugin
Custom operation exposed via plugin, which makes use of scripts as part of its execution
ScriptContextRegistry
Registry for operations that use scripts as part of their execution.
ScriptEngineRegistry
ScriptMetaData
ScriptMetaData is used to store user-defined scripts as part of the ClusterState.
ScriptMetaData.Builder
A builder used to modify the currently stored scripts data held within the ClusterState.
ScriptMetrics
ScriptModes
Holds the boolean indicating the enabled mode for each of the different scripting languages available, each script source and each scripted operation.
ScriptModule
Manages building ScriptService and ScriptSettings from a list of plugins.
ScriptService
ScriptSettings
ScriptStats
StoredScriptSource
StoredScriptSource represents user-defined parameters for a script saved in the ClusterState.
Enum Summary
Enum Description
ScriptContext.Standard
Standard operations that make use of scripts as part of their execution.
ScriptType
ScriptType represents the way a script is stored and retrieved from the ScriptService.

            

ScriptEnginService compile?..... 不推荐。

XXXPlugin extends Plugin implements ScriptPlugin

  实现方法: List<NativeScriptFactory> getNativeScripts()

实现XXXScriptFactory implements NativeScriptFactory  

                NativeScriptFactory  创建ExcutableScript实例 ( ExecutableScript newScript() )

    主要实现ExecutableScript newScript()

实现 XXXScript extends AbstractDoubleSearchScript

            ExecutableScript( run())

    实现 runAsDouble()方法

ExecutableScript是接口。

AbsractSearchScritp 实现了ExecutableScript接口。

AbsractSearchScritp 有个lookup!

NativeScriptEngineService

  search()会调用 script.setLookup()

依赖

ScriptService 的search(SearchLookup lookup)

依赖

parseSource(DefaultSearchContext context

SearchScript searchScript = scriptService.search(context.lookup()

依赖 createAndPutContext

依赖executeDfsPhase

elasticSearch script api的更多相关文章

  1. ElasticSearch Document API

    删除索引库 可以看到id为1的索引库不见了 这里要修改下配置文件 slave1,slave2也做同样的操作,在这里就不多赘述了. 这个时候记得要重启elasticseach才能生效,怎么重启这里就不多 ...

  2. 第08章 ElasticSearch Java API

    本章内容 使用客户端对象(client object)连接到本地或远程ElasticSearch集群. 逐条或批量索引文档. 更新文档内容. 使用各种ElasticSearch支持的查询方式. 处理E ...

  3. Elasticsearch 常用API

    1.   Elasticsearch 常用API 1.1.数据输入与输出 1.1.1.Elasticsearch 文档   #在 Elasticsearch 中,术语 文档 有着特定的含义.它是指最顶 ...

  4. elasticsearch REST api

    elasticsearch REST api========================================命令模式:<REST Verb> /<Index>/ ...

  5. elasticsearch REST API方式批量插入数据

    elasticsearch REST API方式批量插入数据 1:ES的服务地址  http://127.0.0.1:9600/_bulk 2:请求的数据体,注意数据的最后一行记得加换行 { &quo ...

  6. [搜索]ElasticSearch Java Api(一) -添加数据创建索引

    转载:http://blog.csdn.net/napoay/article/details/51707023 ElasticSearch JAVA API官网文档:https://www.elast ...

  7. Elasticsearch java api 基本搜索部分详解

    文档是结合几个博客整理出来的,内容大部分为转载内容.在使用过程中,对一些疑问点进行了整理与解析. Elasticsearch java api 基本搜索部分详解 ElasticSearch 常用的查询 ...

  8. Elasticsearch java api 常用查询方法QueryBuilder构造举例

    转载:http://m.blog.csdn.net/u012546526/article/details/74184769 Elasticsearch java api 常用查询方法QueryBuil ...

  9. ElasticSearch的API介绍

    ElasticSearch的API介绍 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.ES是基于Restful风格 1>ES是基于Restful风格 Elasticsea ...

随机推荐

  1. NOIP 2009 靶形数独(DLX)

    小城和小华都是热爱数学的好学生,最近,他们不约而同地迷上了数独游戏,好胜的他们想用数独来一比高低.但普通的数独对他们来说都过于简单了,于是他们向Z 博士请教,Z 博士拿出了他最近发明的“靶形数独”,作 ...

  2. 【解决】Node JS Error: ENOENT

    The Node Beginner Book 书中的实例代码当上传图片时会报Error: ENOENT, 原因:图片默认会选择系统的缓存文件夹下,在windows下无权访问C盘,所以就报错了.. 解决 ...

  3. hadoop 2.6.0 伪分布式部署安装遇到的问题

    之前读到了一篇关于配置安装hadoop的博文(地址:http://www.powerxing.com/install-hadoop/)能正确安装和运行,但是在网页进行Jobtracker监控时,输入l ...

  4. Java 对象及其内存控制

    作者:禅楼望月(http://www.cnblogs.com/yaoyinglong) 更新:其实这里有好多的变戏法,只要你理解了他们在JVM的中的实现机制,就豁然开朗了.有时间我会把这些变戏法的东西 ...

  5. HDFS集群和YARN集群

    Hadoop集群环境搭建(一)   1集群简介 HADOOP集群具体来说包含两个集群:HDFS集群和YARN集群,两者逻辑上分离,但物理上常在一起 HDFS集群: 负责海量数据的存储,集群中的角色主要 ...

  6. Python 错误和异常处理

    #常见的异常 class Human: #属性 sex = 'man' age = 18 #方法 def run(self): print('跑啊~~~') #实例化对象 #zw = Human() ...

  7. [BZOJ1449] [JSOI2009]球队收益 / [BZOJ2895] 球队预算

    Description 在一个篮球联赛里,有n支球队,球队的支出是和他们的胜负场次有关系的,具体来说,第i支球队的赛季总支出是Cix^2+Diy^2,Di<=Ci.(赢得多,给球员的奖金就多嘛) ...

  8. 从零开始学习MXnet(四)计算图和粗细粒度以及自动求导

    这篇其实跟使用MXnet的关系不大,但对于我们理解深度学习的框架设计还是很有帮助的. 首先还是对promgramming models的一个简单介绍,这个东西实际上是在编译里面经常出现的东西,我们在编 ...

  9. Win10的WSL很好用呀

    WSL全名是Windows Subsystem for Linux,是win10版本号16xx之后推出的开发者功能,提供了如原生linux版的体验. 最近最新的win10春季版1803出来了,安装了看 ...

  10. [hdu 4417]树状数组+离散化+离线处理

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4417 把数字离散化,一个查询拆成两个查询,每次查询一个前缀的和.主要问题是这个数组是静态的,如果带修改 ...