private function parseTermVectors($termVectors, $cutoffFrequencyLimit)
{
$queryTermStats = ['stop' => 0, 'exact' => 0, 'standard' => 0, 'missing' => 0];
$statByPosition = $this->extractTermStatsByPoisition($termVectors);
foreach ($statByPosition as $positionStat) {
$type = 'missing';
if ($positionStat['doc_freq'] > 0) {
$type = 'standard';
if ($positionStat['doc_freq'] >= $cutoffFrequencyLimit) {
$type = 'stop';
} elseif (in_array(FieldInterface::ANALYZER_WHITESPACE, $positionStat['analyzers'])) {
$type = 'exact';
}
}
$queryTermStats[$type]++;
}
$queryTermStats['total'] = count($statByPosition);
return $queryTermStats;
}