2014-01-20 07:23:27 -05:00
|
|
|
setup:
|
|
|
|
- do:
|
2014-01-21 10:30:32 -05:00
|
|
|
indices.create:
|
2014-01-20 07:23:27 -05:00
|
|
|
index: testidx
|
|
|
|
body:
|
|
|
|
mappings:
|
2014-01-21 10:30:32 -05:00
|
|
|
testtype:
|
|
|
|
"properties":
|
|
|
|
"text":
|
|
|
|
"type" : "string"
|
2014-01-20 07:23:27 -05:00
|
|
|
"term_vector" : "with_positions_offsets"
|
|
|
|
- do:
|
|
|
|
index:
|
|
|
|
index: testidx
|
|
|
|
type: testtype
|
|
|
|
id: testing_document
|
|
|
|
body:
|
2014-01-21 10:30:32 -05:00
|
|
|
"text" : "The quick brown fox is brown."
|
2014-01-20 07:23:27 -05:00
|
|
|
- do:
|
|
|
|
indices.refresh: {}
|
|
|
|
|
|
|
|
---
|
2014-01-21 10:30:32 -05:00
|
|
|
"Basic tests for termvector get":
|
2014-01-20 07:23:27 -05:00
|
|
|
|
|
|
|
- do:
|
2014-01-21 10:30:32 -05:00
|
|
|
termvector:
|
2014-01-20 07:23:27 -05:00
|
|
|
index: testidx
|
|
|
|
type: testtype
|
|
|
|
id: testing_document
|
|
|
|
"term_statistics" : true
|
|
|
|
|
|
|
|
|
|
|
|
- match: {term_vectors.text.field_statistics.sum_doc_freq: 5}
|
|
|
|
- match: {term_vectors.text.terms.brown.doc_freq: 1}
|
2014-01-21 10:30:32 -05:00
|
|
|
- match: {term_vectors.text.terms.brown.tokens.0.start_offset: 10}
|