diff --git a/Index/MappingBuilder.php b/Index/MappingBuilder.php index 0751ce7..4a6c70a 100644 --- a/Index/MappingBuilder.php +++ b/Index/MappingBuilder.php @@ -69,7 +69,6 @@ class MappingBuilder return $mapping; } - /** * create type mapping object * diff --git a/Tests/Functional/MappingToElasticaTest.php b/Tests/Functional/MappingToElasticaTest.php index 390f854..f038212 100644 --- a/Tests/Functional/MappingToElasticaTest.php +++ b/Tests/Functional/MappingToElasticaTest.php @@ -28,6 +28,9 @@ class MappingToElasticaTest extends WebTestCase $mapping = $type->getMapping(); $this->assertNotEmpty($mapping, 'Mapping was populated'); + $this->assertArrayHasKey('store', $mapping['type']['properties']['field1']); + $this->assertTrue($mapping['type']['properties']['field1']['store']); + $this->assertArrayNotHasKey('store', $mapping['type']['properties']['field2']); } public function testResetType() @@ -40,6 +43,9 @@ class MappingToElasticaTest extends WebTestCase $mapping = $type->getMapping(); $this->assertNotEmpty($mapping, 'Mapping was populated'); + $this->assertArrayHasKey('store', $mapping['type']['properties']['field1']); + $this->assertTrue($mapping['type']['properties']['field1']['store']); + $this->assertArrayNotHasKey('store', $mapping['type']['properties']['field2']); } public function testORMResetIndexAddsMappings() diff --git a/Tests/Functional/app/Basic/config.yml b/Tests/Functional/app/Basic/config.yml index 174f9d5..0f2403b 100644 --- a/Tests/Functional/app/Basic/config.yml +++ b/Tests/Functional/app/Basic/config.yml @@ -38,6 +38,7 @@ fos_elastica: field1: ~ field2: type: integer + store: false date: { boost: 5 } title: { boost: 8, analyzer: my_analyzer } content: ~