Skip to content

Commit

Permalink
Merge pull request #733 from afoucret/es-6-fix-termvectors
Browse files Browse the repository at this point in the history
Fix server side error when executing a _termvector query.
  • Loading branch information
afoucret authored Feb 7, 2018
2 parents 9c1dbfa + 30eccd8 commit 87c2f81
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ private function getTermVectors(RequestInterface $request)
'index' => $request->getIndex(),
'type' => $request->getType(),
'term_statistics' => true,
'fields' => [
MappingInterface::DEFAULT_SPELLING_FIELD,
MappingInterface::DEFAULT_SPELLING_FIELD . "." . FieldInterface::ANALYZER_WHITESPACE,
],
];

$termVectorsQuery['body']['doc'] = [MappingInterface::DEFAULT_SPELLING_FIELD => $request->getQueryText()];
Expand Down

0 comments on commit 87c2f81

Please sign in to comment.