Analyzeedit

Performs the analysis process on a text and return the tokens breakdown of the text.

Can be used without specifying an index against one of the many built in analyzers:

GET _analyze
{
"analyzer" : "standard",
"text" : "this is a test"
}

If text parameter is provided as array of strings, it is analyzed as a multi-valued field.

GET _analyze
{
"analyzer" : "standard",
"text" : ["this is a test", "the second text"]
}

Or by building a custom transient analyzer out of tokenizers, token filters and char filters. Token filters can use the shorter filter parameter name:

GET _analyze
{
"tokenizer" : "keyword",
"filter" : ["lowercase"],
"text" : "this is a test"
}
GET _analyze
{
"tokenizer" : "keyword",
"filter" : ["lowercase"],
"char_filter" : ["html_strip"],
"text" : "this is a <b>test</b>"
}

Deprecated in 5.0.0.

Use filter/char_filter instead of filters/char_filters and token_filters has been removed

Custom tokenizers, token filters, and character filters can be specified in the request body as follows:

GET _analyze
{
"tokenizer" : "whitespace",
"filter" : ["lowercase", {"type": "stop", "stopwords": ["a", "is", "this"]}],
"text" : "this is a test"
}

It can also run against a specific index:

GET twitter/_analyze
{
"text" : "this is a test"
}

The above will run an analysis on the "this is a test" text, using the default index analyzer associated with the test index. An analyzer can also be provided to use a different analyzer:

GET twitter/_analyze
{
"analyzer" : "whitespace",
"text" : "this is a test"
}

Also, the analyzer can be derived based on a field mapping, for example:

GET twitter/_analyze
{
"field" : "obj1.field1",
"text" : "this is a test"
}

Will cause the analysis to happen based on the analyzer configured in the mapping for obj1.field1(and if not, the default index analyzer).

Deprecated in 5.1.0 request parameters are deprecated and will be removed in the next major release. please use JSON params instead of request params.

All parameters can also supplied as request parameters. For example:

GET /_analyze?tokenizer=keyword&filter=lowercase&text=this+is+a+test

For backwards compatibility, we also accept the text parameter as the body of the request, provided it doesn’t start with { :

curl -XGET 'localhost:9200/_analyze?tokenizer=keyword&filter=lowercase&char_filter=reverse' -d 'this is a test' -H 'Content-Type: text/plain'

Deprecated in 5.1.0 the text parameter as the body of the request are deprecated and this feature will be removed in the next major release. please use JSON text param

Performs the analysis process on a text and return the tokens breakdown of the text的更多相关文章

  1. Oracle Error - "OCIEnvCreate failed with return code -1 but error message text was not available".

    ISSUE: When trying to connect to an Oracle database you receive the following error: "OCIEnvCre ...

  2. 论文阅读(Weilin Huang——【arXiv2016】Accurate Text Localization in Natural Image with Cascaded Convolutional Text Network)

    Weilin Huang——[arXiv2016]Accurate Text Localization in Natural Image with Cascaded Convolutional Tex ...

  3. kettle连接oracle报错oracle.i18n.text.converter.CharacterConverter.OGS.getInstance(I)Loracle/i18n/text/converter/CharacterConverter

    问题背景1:需要将一张excel中的数据导入到数据库中,并且还有关联转换和去重的处理问题,且此excel表不是固定的,需要写一个脚本 当新的excel拿来的时候,可以直接导入即可.所以我想用kettl ...

  4. js让text值不可改变,同<input type="text" readonly="readonly" />

    <input type="text" size="60"  name="j01" value="www.52jscn.com ...

  5. 关于 客户端发现响应内容类型为“text/html; charset=utf-8”,但应为“text/xml”的解决方法

    http://www.cnblogs.com/jams742003/archive/2008/10/30/1322761.html 请求web服务时,会有如题的异常出现,解决方法如下: 1 检查web ...

  6. Sublime Text 3 修改插件安装位置【sublime text、插件路径、Data】

    直接切入正题,在享受Sublime 插件给我们带来开发效率的同时,有些插件的文件也是很大的,但是插件默认安装的位置是AppData的目录[C:\Users\用户名\AppData\Roaming\Su ...

  7. requests之headers 'Content-Type': 'text/html'误判encoding为'ISO-8859-1'导致中文text解码错误

    0. requests不设置UA 访问baidu 得到 r.headers['Content-Type'] 是text/html  使用chrome UA: Content-Type:text/htm ...

  8. selenium.common.exceptions.UnexpectedAlertPresentException: Alert Text: None;Message: unexpected alert open: {Alert text : 您点击的频率过快!请稍后再试}

    报错 Traceback (most recent call last): File "C:/myFiles/code/cnki/cnki_1/core/knavi.py", li ...

  9. MySQL 数据类型对比:char 与 varchar;varchar 与 text;datetime 与 timestamp;blob 与 text;

    char 与 varchar char(n) 若存入字符数小于n,则以空格补于其后,查询之时再将空格去掉.所以 char 类型存储的字符串末尾不能有空格,varchar 不限于此. char(n) 固 ...

随机推荐

  1. input checkbox 复选框大小修改

    设置zoom属性(放大) 利用style: <input type="checkbox" name="returnfee"  style="zo ...

  2. Linux运维实战之DNS(bind)服务器的安装与配置

    转自http://sweetpotato.blog.51cto.com/533893/1598225 上次博文我们讨论了DNS的基础,本次博文我们重点来看看如何配置一台DNS服务器. [本次博文的主要 ...

  3. HttpClient详解

    HttpClient:是一个接口 首先需要先创建一个DefaultHttpClient的实例 HttpClient httpClient=new DefaultHttpClient(); 发送GET请 ...

  4. zip多个分割文件合并

    copy /b 1.z01+1.z02+1.zip 注意:1.zip在最后

  5. [Training Video - 1] [Selenium Basics] [Install Selenium IDE]

    Download and Install Selenium IDE

  6. http://4526621.blog.51cto.com/4516621/1343369

    http://4526621.blog.51cto.com/4516621/1343369

  7. Spring boot——logback.xml 配置详解(四)<filter>

    阅读目录 1 filter的使用 2 常用的过滤器 文章转载自:http://aub.iteye.com/blog/1101260,在此对作者的辛苦表示感谢! 回到顶部 1 filter的使用 < ...

  8. Monokai风格的EditPlus配色方案

    EditPlus的配置文件editplus_u.ini,该文件默认在:系统盘:\Users\用户名\AppData\Roaming\EditPlus目录中.将其中的内容替换为如下即可: [Option ...

  9. SGU 194 Reactor Cooling (有容量和下界的可行流)

    题意:给定上一个有容量和下界的网络,让你求出一组可行解. 析:先建立一个超级源点 s 和汇点 t ,然后在输入时记录到每个结点的下界的和,建边的时候就建立c - b的最后再建立 s 和 t , 在建立 ...

  10. [label][WorldPress] 一个很方便查找定位WorldPress源代码位置的网址

    作为 WordPress 的新手,根本不熟悉那些函数究竟是什么作用的,所以就必须要去看源代码. 要去查看源代码,那么你就必须要熟悉 WordPress 下面文件的作用,以及那个文件中定义了有哪些函数? ...