CONSOLEify some more docs

Relates to #18160
This commit is contained in:
Nik Everett 2017-04-24 16:08:19 -04:00
parent 5fbc86e2aa
commit e429d66956
8 changed files with 32 additions and 25 deletions

View File

@ -80,13 +80,6 @@ buildRestTests.expectedUnconvertedCandidates = [
'reference/indices/shard-stores.asciidoc',
'reference/ingest/ingest-node.asciidoc',
'reference/mapping/dynamic/templates.asciidoc',
'reference/mapping/fields/all-field.asciidoc',
'reference/mapping/params/analyzer.asciidoc',
'reference/mapping/types/binary.asciidoc',
'reference/mapping/types/ip.asciidoc',
'reference/mapping/types/nested.asciidoc',
'reference/mapping/types/object.asciidoc',
'reference/mapping/types/percolator.asciidoc',
'reference/modules/cross-cluster-search.asciidoc', // this is hard to test since we need 2 clusters -- maybe we can trick it into referencing itself...
'reference/search/field-stats.asciidoc',
'reference/search/profile.asciidoc',

View File

@ -101,6 +101,8 @@ requests>> (which is rewritten to a `query_string` query internally):
--------------------------------
GET _search?q=john+smith+new+york
--------------------------------
// TEST[skip:_all is no longer allowed]
// CONSOLE
Other queries, such as the <<query-dsl-match-query,`match`>> and
<<query-dsl-term-query,`term`>> queries require you to specify the `_all` field

View File

@ -135,11 +135,7 @@ PUT my_index
}
}
}
--------------------------------------------------
// CONSOLE
[source,js]
--------------------------------------------------
PUT my_index/my_type/1
{
"title":"The Quick Brown Fox"
@ -159,6 +155,7 @@ GET my_index/my_type/_search
}
}
--------------------------------------------------
// CONSOLE
<1> `my_analyzer` analyzer which tokens all terms including stop words
<2> `my_stop_analyzer` analyzer which removes stop words
<3> `analyzer` setting that points to the `my_analyzer` analyzer which will be used at index time

View File

@ -29,6 +29,7 @@ PUT my_index/my_type/1
"blob": "U29tZSBiaW5hcnkgYmxvYg==" <1>
}
--------------------------------------------------
// CONSOLE
<1> The Base64 encoded binary value must not have embedded newlines `\n`.
[[binary-params]]
@ -49,5 +50,3 @@ The following parameters are accepted by `binary` fields:
Whether the field value should be stored and retrievable separately from
the <<mapping-source-field,`_source`>> field. Accepts `true` or `false`
(default).

View File

@ -34,7 +34,7 @@ GET my_index/_search
}
--------------------------------------------------
// CONSOLE
// TESTSETUP
[[ip-params]]
==== Parameters for `ip` fields
@ -86,6 +86,7 @@ GET my_index/_search
}
}
--------------------------------------------------
// CONSOLE
or
@ -100,6 +101,7 @@ GET my_index/_search
}
}
--------------------------------------------------
// CONSOLE
Also beware that colons are special characters to the
<<query-dsl-query-string-query,`query_string`>> query, so ipv6 addresses will
@ -108,7 +110,7 @@ searched value:
[source,js]
--------------------------------------------------
GET t/_search
GET my_index/_search
{
"query": {
"query_string" : {
@ -117,3 +119,4 @@ GET t/_search
}
}
--------------------------------------------------
// CONSOLE

View File

@ -42,6 +42,7 @@ would be transformed internally into a document that looks more like this:
"user.last" : [ "smith", "white" ]
}
--------------------------------------------------
// NOTCONSOLE
The `user.first` and `user.last` fields are flattened into multi-value fields,
and the association between `alice` and `white` is lost. This document would

View File

@ -35,6 +35,7 @@ pairs, something like this:
"manager.name.last": "Smith"
}
--------------------------------------------------
// NOTCONSOLE
An explicit mapping for the above document could look like this:
@ -96,4 +97,3 @@ The following parameters are accepted by `object` fields:
IMPORTANT: If you need to index arrays of objects instead of single objects,
read <<nested>> first.

View File

@ -15,19 +15,30 @@ If the following mapping configures the `percolator` field type for the
[source,js]
--------------------------------------------------
PUT my_index
{
"mappings": {
"doc": {
"properties": {
"query": {
"type": "percolator"
},
"field": {
"type": "text"
}
}
}
}
}
--------------------------------------------------
// CONSOLE
// TESTSETUP
Then the following json snippet can be indexed as a native query:
Then you can index a query:
[source,js]
--------------------------------------------------
PUT my_index/doc/match_value
{
"query" : {
"match" : {
@ -36,6 +47,7 @@ Then the following json snippet can be indexed as a native query:
}
}
--------------------------------------------------
// CONSOLE
[IMPORTANT]
=====================================