Ver código fonte

Docs: Fix termvectors by removing example blocks with embedded CONSOLE tests

Clinton Gormley 8 anos atrás
pai
commit
40f40d7676
1 arquivos alterados com 11 adições e 17 exclusões
  1. 11 17
      docs/reference/docs/termvectors.asciidoc

+ 11 - 17
docs/reference/docs/termvectors.asciidoc

@@ -121,8 +121,8 @@ whereas the absolute numbers have no meaning in this context. By default,
 when requesting term vectors of artificial documents, a shard to get the statistics
 from is randomly selected. Use `routing` only to hit a particular shard.
 
-.Returning stored term vectors
-==================================================
+[float]
+==== Example: Returning stored term vectors
 
 First, we create an index that stores term vectors, payloads etc. :
 
@@ -270,10 +270,8 @@ Response:
 // TEST[continued]
 // TESTRESPONSE[s/"took": 6/"took": "$body.took"/]
 
-==================================================
-
-.Generating term vectors on the fly
-==================================================
+[float]
+==== Example: Generating term vectors on the fly
 
 Term vectors which are not explicitly stored in the index are automatically
 computed on the fly. The following request returns all information and statistics for the
@@ -293,12 +291,10 @@ GET /twitter/tweet/1/_termvectors
 --------------------------------------------------
 // CONSOLE
 // TEST[continued]
-==================================================
 
 [[docs-termvectors-artificial-doc]]
-[example]
-.Artificial documents
---
+[float]
+==== Example: Artificial documents
 
 Term vectors can also be generated for artificial documents,
 that is for documents not present in the index.  For example, the following request would
@@ -320,11 +316,10 @@ GET /twitter/tweet/_termvectors
 --------------------------------------------------
 // CONSOLE
 // TEST[continued]
---
 
 [[docs-termvectors-per-field-analyzer]]
-.Per-field analyzer
-==================================================
+[float]
+===== Per-field analyzer
 
 Additionally, a different analyzer than the one at the field may be provided
 by using the `per_field_analyzer` parameter. This is useful in order to
@@ -387,11 +382,11 @@ Response:
 // TESTRESPONSE[s/"sum_doc_freq": 2/"sum_doc_freq": "$body.term_vectors.fullname.field_statistics.sum_doc_freq"/]
 // TESTRESPONSE[s/"doc_count": 4/"doc_count": "$body.term_vectors.fullname.field_statistics.doc_count"/]
 // TESTRESPONSE[s/"sum_ttf": 4/"sum_ttf": "$body.term_vectors.fullname.field_statistics.sum_ttf"/]
-==================================================
+
 
 [[docs-termvectors-terms-filtering]]
-.Terms filtering
-==================================================
+[float]
+==== Example: Terms filtering
 
 Finally, the terms returned could be filtered based on their tf-idf scores. In
 the example below we obtain the three most "interesting" keywords from the
@@ -461,4 +456,3 @@ Response:
 }
 --------------------------------------------------
 // TESTRESPONSE
-==================================================