Feature: Indexing
In order to search for things
As a developer
I must first index them
Background:
Given the entity "IndexingCar" exists:
"""
"""
And I index the following "IndexingCar" objects
"""
[
{ "id": 123, "url": "/url/to", "title": "My car", "body": "Hello", "image": "foo.jpg", "passengers": ["Jackson", "Jill"] },
{ "id": 321, "url": "/url/to", "title": "My car", "body": "Hello", "image": "foo.jpg", "passengers": ["Jack"] }
]
"""
When I search for ""
Then there should be results
Examples:
| search | nbResults |
| My Car | 2 |
| jac* | 2 |
| Jac* | 2 |
| jill | 1 |
| Jill | 1 |
| john | 0 |
| jac | 0 |
| Jackson | 1 |
@zend_lucene @elastic @test
Scenario: Invalid mapping, unknown field type
Given that the following mapping for "IndexingCar" exists:
"""
"""
When I index the following "IndexingCar" objects
"""
[
{ "id": 123, "url": "/url/to", "title": "My car", "body": "Hello", "image": "foo.jpg"},
{ "id": 321, "url": "/url/to", "title": "My car", "body": "Hello", "image": "foo.jpg"}
]
"""
Then an exception with message 'No converter found to convert value from type "foobar"' should be thrown