Small corrections to HLRC doc for _termvectors (#35221)

Relates to #33447
This commit is contained in:
Mayya Sharipova 2018-11-04 18:29:07 -05:00 committed by GitHub
parent 28078642b3
commit a2c22ad7ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -1549,23 +1549,23 @@ public class CRUDDocumentationIT extends ESRestHighLevelClientTestCase {
// Not entirely sure if _termvectors belongs to CRUD, and in the absence of a better place, will have it here
public void testTermVectors() throws Exception {
RestHighLevelClient client = highLevelClient();
CreateIndexRequest authorsRequest = new CreateIndexRequest("authors").mapping("doc", "user", "type=keyword");
CreateIndexRequest authorsRequest = new CreateIndexRequest("authors").mapping("_doc", "user", "type=keyword");
CreateIndexResponse authorsResponse = client.indices().create(authorsRequest, RequestOptions.DEFAULT);
assertTrue(authorsResponse.isAcknowledged());
client.index(new IndexRequest("index", "doc", "1").source("user", "kimchy"), RequestOptions.DEFAULT);
client.index(new IndexRequest("index", "_doc", "1").source("user", "kimchy"), RequestOptions.DEFAULT);
Response refreshResponse = client().performRequest(new Request("POST", "/authors/_refresh"));
assertEquals(200, refreshResponse.getStatusLine().getStatusCode());
{
// tag::term-vectors-request
TermVectorsRequest request = new TermVectorsRequest("authors", "doc", "1");
TermVectorsRequest request = new TermVectorsRequest("authors", "_doc", "1");
request.setFields("user");
// end::term-vectors-request
}
{
// tag::term-vectors-request-artificial
TermVectorsRequest request = new TermVectorsRequest("authors", "doc");
TermVectorsRequest request = new TermVectorsRequest("authors", "_doc");
XContentBuilder docBuilder = XContentFactory.jsonBuilder();
docBuilder.startObject().field("user", "guest-user").endObject();
request.setDoc(docBuilder); // <1>
@ -1598,7 +1598,7 @@ public class CRUDDocumentationIT extends ESRestHighLevelClientTestCase {
// end::term-vectors-request-optional-arguments
}
TermVectorsRequest request = new TermVectorsRequest("authors", "doc", "1");
TermVectorsRequest request = new TermVectorsRequest("authors", "_doc", "1");
request.setFields("user");
// tag::term-vectors-execute

View File

@ -62,9 +62,9 @@ include::../execution.asciidoc[]
[id="{upid}-{api}-response"]
==== TermVectorsResponse
==== Term Vectors Response
The `TermVectorsResponse` contains the following information:
+{response}+ contains the following information:
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
@ -77,7 +77,7 @@ include-tagged::{doc-tests-file}[{api}-response]
===== Inspecting Term Vectors
If `TermVectorsResponse` contains non-null list of term vectors,
If +{response}+ contains non-null list of term vectors,
more information about each term vector can be obtained using the following:
["source","java",subs="attributes,callouts,macros"]