Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Perform all checks down the chain

Just validating the existence of a property doesn't presume it is automatically created by the dynamic template.
  • Loading branch information...
commit 3d5a09cbbd7875a7a0564f8e416b551d81775822 1 parent 3c8b7a5
@jappievw jappievw authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 test/lib/Elastica/Test/Type/MappingTest.php
View
9 test/lib/Elastica/Test/Type/MappingTest.php
@@ -217,6 +217,13 @@ public function testDynamicTemplate()
$this->assertArrayHasKey('properties', $newMapping['person'],
'Person type doesnt have any properties. Document properly added?');
$this->assertArrayHasKey('multiname', $newMapping['person']['properties'],
- 'The multi* matcher did not create a mapping for the multiname property when indexing the document.');
+ 'The multiname property is not added to the mapping. Document properly added?');
+ $this->assertArrayHasKey('fields', $newMapping['person']['properties']['multiname'],
+ 'The multiname field of the Person type is presumably not a multi_field type. Dynamic mapping not applied?');
+ $this->assertArrayHasKey('org', $newMapping['person']['properties']['multiname']['fields'],
+ 'The multi* matcher did not create a mapping for the multiname.org property when indexing the document.');
+ $this->assertArrayHasKey('index', $newMapping['person']['properties']['multiname']['fields']['org'],
+ 'Indexing status of the multiname.org not available. Dynamic mapping not fully applied!');
+ $this->assertEquals('not_analyzed', $newMapping['person']['properties']['multiname']['fields']['org']['index']);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.