From 8a0a932e178f16e506abc40f45a0744580c1dd54 Mon Sep 17 00:00:00 2001 From: Zachary Tong Date: Mon, 9 May 2016 12:01:00 -0400 Subject: [PATCH] Add missing params to Analyze endpoint: `char_filter`, `format`, `attributes`, `explain` --- src/Elasticsearch/Endpoints/Indices/Analyze.php | 4 ++++ src/Elasticsearch/Namespaces/IndicesNamespace.php | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Elasticsearch/Endpoints/Indices/Analyze.php b/src/Elasticsearch/Endpoints/Indices/Analyze.php index f8ae76784..f156ee6a5 100644 --- a/src/Elasticsearch/Endpoints/Indices/Analyze.php +++ b/src/Elasticsearch/Endpoints/Indices/Analyze.php @@ -62,6 +62,10 @@ protected function getParamWhitelist() 'text', 'tokenizer', 'format', + 'char_filter', + 'explain', + 'attributes', + 'format' ); } diff --git a/src/Elasticsearch/Namespaces/IndicesNamespace.php b/src/Elasticsearch/Namespaces/IndicesNamespace.php index 219561041..826c2847f 100644 --- a/src/Elasticsearch/Namespaces/IndicesNamespace.php +++ b/src/Elasticsearch/Namespaces/IndicesNamespace.php @@ -929,12 +929,16 @@ public function open($params) * $params['index'] = (string) The name of the index to scope the operation * ['analyzer'] = (string) The name of the analyzer to use * ['field'] = (string) Use the analyzer configured for this field (instead of passing the analyzer name) - * ['filter'] = (list) A comma-separated list of filters to use for the analysis + * ['filter'] = (list) A comma-separated list of filters to use for the analysis * ['prefer_local'] = (boolean) With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true) * ['text'] = (string) The text on which the analysis should be performed (when request body is not used) * ['tokenizer'] = (string) The name of the tokenizer to use for the analysis * ['format'] = (enum) Format of the output * ['body'] = (enum) Format of the output + * ['char_filter'] = (list) A comma-separated list of character filters to use for the analysis + * ['explain'] = (bool) With `true`, outputs more advanced details. (default: false) + * ['attributes'] = (list) A comma-separated list of token attributes to output, this parameter works only with `explain=true` + * ['format'] = (enum) Format of the output (["detailed", "text"]) * * @param $params array Associative array of parameters *