Example #1
0
 public function testClearFieldsBoostRemoval()
 {
     $this->doc->setFieldBoost('name', 3.2);
     $this->doc->clear();
     $this->assertEquals(null, $this->doc->getFieldBoost('name'));
 }
Example #2
0
 public function testBuildAddXmlSingleDocumentWithFieldBoost()
 {
     $doc = new Document(array('id' => 1));
     $doc->setFieldBoost('id', 2.1);
     $command = new AddCommand();
     $command->addDocument($doc);
     $this->assertEquals('<add><doc><field name="id" boost="2.1">1</field></doc></add>', $this->builder->buildAddXml($command));
 }