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. LTE/EPC中,MME怎么找到UE的HSS的?

    http://bbs.c114.net/forum.php?mod=viewthread&tid=486247 HSS---归属用户服务器,我的理解:一般来说只有一个,或者是一个分布式数据库. ...

  2. 3GPP规范命名规则解读

    http://blog.sina.com.cn/s/blog_6b10255301012co6.html 学习了解电信技术知识的一个很好的手段是阅读3GPP的规范.但是3GPP有大量的规范,我们可能经 ...

  3. 【bzoj4619】[Wf2016]Swap Space 贪心

    题目描述 你有许多电脑,它们的硬盘用不同的文件系统储存数据.你想要通过格式化来统一文件系统.格式化硬盘可能使它的容量发生变化.为了格式化,你需要买额外的硬盘.当然,你想要买容量最小的额外储存设备以便省 ...

  4. 感觉自己应该重新读一次Javascript

    我自己也有一本Javascript书籍,是自己上大学的时候学校给提供的,现在,我依旧带着这本书.我决定要把这本书在重新温习一下.然后,开启下面的Javascript之旅.这是我看到博客园一位园友写的, ...

  5. P1196 [NOI2002]银河英雄传说

    题目描述 公元五八○一年,地球居民迁至金牛座α第二行星,在那里发表银河联邦创立宣言,同年改元为宇宙历元年,并开始向银河系深处拓展. 宇宙历七九九年,银河系的两大军事集团在巴米利恩星域爆发战争.泰山压顶 ...

  6. 周记【距gdoi:110天】

    这两个星期都在复习和考试,进度慢了好多.(考试也觉得似乎不是很理想) 姚老要我们写个程序来应对学校的分班问题.然后我们就脑洞打开准备设计一个.写应用程序应该是很烧时间的吧? 接下来搞搞后缀数组,然后还 ...

  7. 【BZOJ 4514】[Sdoi2016]数字配对 费用流

    利用spfa流的性质,我直接拆两半,正解分奇偶(妙),而且判断是否整除且质数我用的是暴力根号,整洁判断质数个数差一(其他非spfa流怎么做?) #include <cstdio> #inc ...

  8. JS让任意图片垂直水平居中且页面不滚动

    说一下以前遇到的一个问题: 假设有一张小图,要实现点击查看大图的功能,而这个图的宽高可能会超过浏览器的宽高,这时候我们通过JS来改变图片的宽高,从而实现图片在浏览器居中显示且不滚屏. 方法如下: 首先 ...

  9. jQuery源码分析笔记

    jquery-2.0.3.js版本源码分析 (function(){  (21,94) 定义了一些变量和函数 jQuery = function(){};  (96,283) 给JQ对象,添加一些方法 ...

  10. HDU 5655 四边形判断

    CA Loves Stick Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others) ...