public function testSetAndGetFragmenter() { $value = Highlighting::FRAGMENTER_REGEX; $this->fld->setFragmenter($value); $this->assertEquals($value, $this->fld->getFragmenter()); }
/** * Add per-field override options to the request * * @param HighlightingField $field * @param Request $request * @return void */ protected function addFieldParams($field, $request) { $prefix = 'f.' . $field->getName() . '.hl.'; $request->addParam($prefix . 'snippets', $field->getSnippets()); $request->addParam($prefix . 'fragsize', $field->getFragSize()); $request->addParam($prefix . 'mergeContiguous', $field->getMergeContiguous()); $request->addParam($prefix . 'alternateField', $field->getAlternateField()); $request->addParam($prefix . 'formatter', $field->getFormatter()); $request->addParam($prefix . 'simple.pre', $field->getSimplePrefix()); $request->addParam($prefix . 'simple.post', $field->getSimplePostfix()); $request->addParam($prefix . 'fragmenter', $field->getFragmenter()); $request->addParam($prefix . 'useFastVectorHighlighter', $field->getUseFastVectorHighlighter()); }