addField('fieldA');
$field = $component->getField('fieldB');
$field->setSnippets(3);
$field->setFragSize(25);
$field->setMergeContiguous(true);
$field->setAlternateField('text');
$field->setFormatter('myFormatter');
$field->setSimplePrefix('');
$field->setSimplePostfix('');
$field->setFragmenter('myFragmenter');
$field->setUseFastVectorHighlighter(true);
$component->setSnippets(2);
$component->setFragSize(3);
$component->setMergeContiguous(true);
$component->setRequireFieldMatch(false);
$component->setMaxAnalyzedChars(4);
$component->setAlternateField('fieldC');
$component->setMaxAlternateFieldLength(5);
$component->setFormatter('simple');
$component->setSimplePrefix('');
$component->setSimplePostfix('');
$component->setFragmenter('myFragmenter');
$component->setFragListBuilder('myFragListBuilder');
$component->setFragmentsBuilder('myFragmentsBuilder');
$component->setUsePhraseHighlighter(true);
$component->setUseFastVectorHighlighter(false);
$component->setHighlightMultiTerm(true);
$component->setRegexSlop(1.3);
$component->setRegexPattern('mypattern');
$component->setMaxAnalyzedChars(100);
$component->setQuery('text:myvalue');
$component->setPhraseLimit(40);
$request = $builder->buildComponent($component, $request);
$this->assertEquals(
array(
'hl' => 'true',
'hl.fl' => 'fieldA,fieldB',
'hl.snippets' => 2,
'hl.fragsize' => 3,
'hl.mergeContiguous' => 'true',
'hl.requireFieldMatch' => 'false',
'hl.maxAnalyzedChars' => 100,
'hl.alternateField' => 'fieldC',
'hl.maxAlternateFieldLength' => 5,
'hl.formatter' => 'simple',
'hl.simple.pre' => '',
'hl.simple.post' => '',
'hl.fragmenter' => 'myFragmenter',
'hl.fragListBuilder' => 'myFragListBuilder',
'hl.fragmentsBuilder' => 'myFragmentsBuilder',
'hl.useFastVectorHighlighter' => 'false',
'hl.usePhraseHighlighter' => 'true',
'hl.highlightMultiTerm' => 'true',
'hl.regex.slop' => 1.3,
'hl.regex.pattern' => 'mypattern',
'hl.q' => 'text:myvalue',
'hl.phraseLimit' => 40,
'f.fieldB.hl.snippets' => 3,
'f.fieldB.hl.fragsize' => 25,
'f.fieldB.hl.mergeContiguous' => 'true',
'f.fieldB.hl.alternateField' => 'text',
'f.fieldB.hl.formatter' => 'myFormatter',
'f.fieldB.hl.simple.pre' => '',
'f.fieldB.hl.simple.post' => '',
'f.fieldB.hl.fragmenter' => 'myFragmenter',
'f.fieldB.hl.useFastVectorHighlighter' => 'true',
),
$request->getParams()
);
}
}