86 lines
2.2 KiB
YAML
86 lines
2.2 KiB
YAML
|
setup:
|
||
|
- do:
|
||
|
indices.create:
|
||
|
index: testidx
|
||
|
body:
|
||
|
mappings:
|
||
|
testtype:
|
||
|
properties:
|
||
|
text:
|
||
|
type : "string"
|
||
|
term_vector : "with_positions_offsets"
|
||
|
- do:
|
||
|
index:
|
||
|
index: testidx
|
||
|
type: testtype
|
||
|
id: testing_document
|
||
|
body: {"text" : "The quick brown fox is brown."}
|
||
|
|
||
|
- do:
|
||
|
indices.refresh: {}
|
||
|
|
||
|
---
|
||
|
"Basic tests for multi termvector get":
|
||
|
|
||
|
- do:
|
||
|
mtermvectors:
|
||
|
"term_statistics" : true
|
||
|
"body" :
|
||
|
"docs":
|
||
|
-
|
||
|
"_index" : "testidx"
|
||
|
"_type" : "testtype"
|
||
|
"_id" : "testing_document"
|
||
|
|
||
|
- match: {docs.0.term_vectors.text.terms.brown.term_freq: 2}
|
||
|
- match: {docs.0.term_vectors.text.terms.brown.ttf: 2}
|
||
|
|
||
|
- do:
|
||
|
mtermvectors:
|
||
|
"term_statistics" : true
|
||
|
"body" :
|
||
|
"docs":
|
||
|
-
|
||
|
"_index" : "testidx"
|
||
|
"_type" : "testtype"
|
||
|
"_id" : "testing_document"
|
||
|
|
||
|
- match: {docs.0.term_vectors.text.terms.brown.term_freq: 2}
|
||
|
- match: {docs.0.term_vectors.text.terms.brown.ttf: 2}
|
||
|
|
||
|
- do:
|
||
|
mtermvectors:
|
||
|
"term_statistics" : true
|
||
|
"index" : "testidx"
|
||
|
"body" :
|
||
|
"docs":
|
||
|
-
|
||
|
"_type" : "testtype"
|
||
|
"_id" : "testing_document"
|
||
|
|
||
|
- match: {docs.0.term_vectors.text.terms.brown.term_freq: 2}
|
||
|
- match: {docs.0.term_vectors.text.terms.brown.ttf: 2}
|
||
|
|
||
|
- do:
|
||
|
mtermvectors:
|
||
|
"term_statistics" : true
|
||
|
"index" : "testidx"
|
||
|
"type" : "testtype"
|
||
|
"body" :
|
||
|
"docs":
|
||
|
-
|
||
|
"_id" : "testing_document"
|
||
|
|
||
|
- match: {docs.0.term_vectors.text.terms.brown.term_freq: 2}
|
||
|
- match: {docs.0.term_vectors.text.terms.brown.ttf: 2}
|
||
|
|
||
|
- do:
|
||
|
mtermvectors:
|
||
|
"term_statistics" : true
|
||
|
"index" : "testidx"
|
||
|
"type" : "testtype"
|
||
|
"ids" : ["testing_document"]
|
||
|
|
||
|
- match: {docs.0.term_vectors.text.terms.brown.term_freq: 2}
|
||
|
- match: {docs.0.term_vectors.text.terms.brown.ttf: 2}
|