From b7c4adeea3ce0b8341a5ac66fd83cd676eaade64 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Wed, 16 Oct 2013 16:31:36 +0200 Subject: [PATCH] [Docs] update reference to remove documentation about percolating during an index, bulk or update request. --- docs/java-api/index_.asciidoc | 1 - docs/java-api/percolate.asciidoc | 10 +++--- docs/reference/docs/bulk.asciidoc | 7 ---- docs/reference/docs/index_.asciidoc | 34 ------------------- docs/reference/docs/update.asciidoc | 3 -- .../queries/query-string-syntax.asciidoc | 4 +-- docs/reference/search.asciidoc | 2 +- 7 files changed, 8 insertions(+), 53 deletions(-) diff --git a/docs/java-api/index_.asciidoc b/docs/java-api/index_.asciidoc index 850d0eb33c0..e60157a552b 100644 --- a/docs/java-api/index_.asciidoc +++ b/docs/java-api/index_.asciidoc @@ -182,7 +182,6 @@ you percolator that have matched: -------------------------------------------------- IndexResponse response = client.prepareIndex("twitter", "tweet", "1") .setSource(json) - .setPercolate("*") .execute() .actionGet(); diff --git a/docs/java-api/percolate.asciidoc b/docs/java-api/percolate.asciidoc index f893674c656..a9d807ff852 100644 --- a/docs/java-api/percolate.asciidoc +++ b/docs/java-api/percolate.asciidoc @@ -14,7 +14,7 @@ documentation before reading this guide. QueryBuilder qb = termQuery("content", "amazing"); //Index the query = register it in the percolator -client.prepareIndex("_percolator", "myIndexName", "myDesignatedQueryName") +client.prepareIndex("myIndexName", "_percolator", "myDesignatedQueryName") .setSource(jsonBuilder() .startObject() .field("query", qb) // Register the query @@ -38,10 +38,12 @@ docBuilder.field("content", "This is amazing!"); docBuilder.endObject(); //End of the doc field docBuilder.endObject(); //End of the JSON root object //Percolate -PercolateResponse response = - client.preparePercolate("myIndexName", "myDocumentType").setSource(docBuilder).execute().actionGet(); +PercolateResponse response = client.preparePercolate() + .setIndices("myIndexName") + .setDocumentType("myDocumentType") + .setSource(docBuilder).execute().actionGet(); //Iterate over the results -for(String result : response) { +for(PercolateResponse.Match match : response) { //Handle the result which is the name of //the query in the percolator } diff --git a/docs/reference/docs/bulk.asciidoc b/docs/reference/docs/bulk.asciidoc index 52e041d164e..42b4fad288e 100644 --- a/docs/reference/docs/bulk.asciidoc +++ b/docs/reference/docs/bulk.asciidoc @@ -102,13 +102,6 @@ Each bulk item can include the routing value using the `_routing`/`routing` field. It automatically follows the behavior of the index / delete operation based on the `_routing` mapping. -[float] -[[percolator]] -=== Percolator - -Each bulk index action can include a percolate value using the -`_percolate`/`percolate` field. - [float] [[bulk-parent]] === Parent diff --git a/docs/reference/docs/index_.asciidoc b/docs/reference/docs/index_.asciidoc index 4f5dc836faf..d4383794891 100644 --- a/docs/reference/docs/index_.asciidoc +++ b/docs/reference/docs/index_.asciidoc @@ -286,40 +286,6 @@ curl -XPUT 'http://localhost:9200/twitter/tweet/1' -d '{ More information can be found on the <>. -[float] -[[percolate]] -=== Percolate - -<> can be performed -at index time by passing the `percolate` parameter. Setting it to `*` -will cause all percolation queries registered against the index to be -checked against the provided document, for example: - -[source,js] --------------------------------------------------- -curl -XPUT localhost:9200/test/type1/1?percolate=* -d '{ - "field1" : "value1" -}' --------------------------------------------------- - -To filter out which percolator queries will be executed, pass the query -string syntax to the `percolate` parameter: - -[source,js] --------------------------------------------------- -curl -XPUT localhost:9200/test/type1/1?percolate=color:green -d '{ - "field1" : "value1", - "field2" : "value2" -}' --------------------------------------------------- - -*NOTE:* In a distributed cluster, percolation during the index operation -is performed on the primary shard, as soon as the index operation -completes. The operation executes on the primary while the replicas are -updating, concurrently. Percolation during the index operation somewhat -cuts down on parsing overhead, as the parse tree for the document is -simply re-used for percolation. - [float] [[index-distributed]] === Distributed diff --git a/docs/reference/docs/update.asciidoc b/docs/reference/docs/update.asciidoc index 4d51e035e8f..6c48a9bf561 100644 --- a/docs/reference/docs/update.asciidoc +++ b/docs/reference/docs/update.asciidoc @@ -157,9 +157,6 @@ including: `consistency`:: The write consistency of the index/delete operation. -`percolate`:: Enables percolation and filters out which percolator - queries will be executed. - `refresh`:: Refresh the index immediately after the operation occurs, so that the updated document appears in search results immediately. diff --git a/docs/reference/query-dsl/queries/query-string-syntax.asciidoc b/docs/reference/query-dsl/queries/query-string-syntax.asciidoc index 4e7f5a65d89..6009827fd49 100644 --- a/docs/reference/query-dsl/queries/query-string-syntax.asciidoc +++ b/docs/reference/query-dsl/queries/query-string-syntax.asciidoc @@ -4,9 +4,7 @@ The query string ``mini-language'' is used by the <> and <>, by the -`q` query string parameter in the <> and -by the `percolate` parameter in the <> and -<> APIs. +`q` query string parameter in the <>. The query string is parsed into a series of _terms_ and _operators_. A term can be a single word -- `quick` or `brown` -- or a phrase, surrounded by diff --git a/docs/reference/search.asciidoc b/docs/reference/search.asciidoc index fd3b06d3119..d911ffb600c 100644 --- a/docs/reference/search.asciidoc +++ b/docs/reference/search.asciidoc @@ -5,7 +5,7 @@ -- Most search APIs are <>, with the -exception of the <> and <> endpoints. +exception of the <> endpoints. [float] [[search-routing]]