From c05e0caa9cdc5c599780dd740be843c92bfdbbce Mon Sep 17 00:00:00 2001 From: Tim Nagel Date: Thu, 2 May 2013 10:18:05 +1000 Subject: [PATCH] Added documentation for ignoring missing hits --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 0bcae02..c289cd6 100644 --- a/README.md +++ b/README.md @@ -534,6 +534,23 @@ The delete listener disregards the callback. > **Propel** doesn't support this feature yet. +### Ignoring missing index results + +By default, FOSElasticaBundle will throw an exception if the results returned from +Elasticsearch are different from the results it finds from the chosen persistence +provider. This may pose problems for a large index where updates do not occur instantly +or another process has removed the results from your persistence provider without +updating Elasticsearch. + +The error you're likely to see is something like: +'Cannot find corresponding Doctrine objects for all Elastica results.' + +To solve this issue, each mapped object can be configured to ignore the missing results: + + persistence: + elastica_to_model_transformer: + ignore_missing: true + ### Advanced elasticsearch configuration Any setting can be specified when declaring a type. For example, to enable a custom analyzer, you could write: