Commit graph

29 commits

Author SHA1 Message Date
Tim Nagel dd388e4b25 CS fixes 2015-03-12 21:20:00 +11:00
Tim Nagel 1d5fe44ca4 Fix CS from scrutiniser-ci 2014-09-21 20:12:30 +10:00
Tim Nagel 21e5d906a7 Simplify *One methods in the persister 2014-07-03 23:37:44 +10:00
Tim Nagel aafb8c8e89 Fix indexable callbacks with alias based indexes 2014-06-17 12:03:38 +10:00
Tim Nagel 66d2410999 Move Indexable callback calculations to a new service 2014-06-16 15:57:42 +10:00
nurikabe f07e55417d Re-throw exception if no logger defined 2014-04-07 16:16:37 -04:00
nurikabe a483471694 Set listener loggers to fos_elastica.logger if null 2014-04-04 22:56:47 -04:00
Evan Owens 53332eb057 Allow for catching/logging persistance errors per listener 2014-04-04 18:32:48 -04:00
Evan Owens 6f444f1ce8 Bulk upsert 2014-04-04 15:51:55 -04:00
Tim Nagel ff95945819 Merge pull request #527 from baggachipz/master
Upsert-type functionality for existing ORM Entities
2014-04-02 08:47:47 +11:00
baggachipz 20810fa415 Upsert-type functionality for existing ORM Entities
This is an attempt to fix the issue: https://github.com/FriendsOfSymfony/FOSElasticaBundle/issues/526

It will cause a significant slowdown in a large batch, but it appears to be the only way to prevent an exception from bubbling up during a normal use case.
2014-03-31 15:16:32 -04:00
nurikabe 0de48d2190 Use identifiers for bulk delete rather than cloning objects 2014-03-29 18:36:06 -04:00
nurikabe 1dcaadbe6f Bulk delete 2014-02-01 02:14:21 +00:00
nurikabe b6d010a9d7 Bulk update. Still working on bulk delete for indexes and types in Elastica. 2014-01-23 16:20:11 +00:00
Richard Fullmer 1fc94b2213 Ignore failed deletions in ObjectPersister
This probably isn't the best way to solve my problem,
but the issue is this.

Step 1:  Create a new doctrine entity for which it's `is_indexable_callback`
returns false.  When doctrine flushes this entity to the database,
elastia will not index it with elastic search.  (Correct)

Step 2:  Update your doctrine entity and change some fields so
that `is_indexable_callback` _still_ returns false.  Persist and flush
to the database.

At this point, the postUpdate listener on ElastiaBundle is called
and since the `is_indexable_callback` returns false, it believes
it needs to remove it from the elastic search index and queues it
for deletion.  The deletion of course fails because it was never there
in the first place.

This solution simply ignores failures from deletions in the index.

Perhaps a better solution would be to have a smarter listener
that could determine if the entity was previously present in the
elastic search index or not, but that would require significant
refactoring.

Addresses issues discuseed in #284

Credit to @bbeaulant for simple solution.  Opening a PR to
discuss more generally.
2013-06-04 11:45:45 -07:00
Lukas Kahwe Smith aafb6e53fb made the bundle compatible with Elastica 0.20.x 2013-04-26 14:10:05 +02:00
Jeremy Mikola 440c36f537 Merge remote-tracking branch 'cevou/master' into pr/245
Conflicts:
	Command/PopulateCommand.php
	Command/SearchCommand.php
	DependencyInjection/Configuration.php
	Doctrine/AbstractElasticaToModelTransformer.php
	Doctrine/AbstractListener.php
	Doctrine/MongoDB/ElasticaToModelTransformer.php
	Doctrine/ORM/ElasticaToModelTransformer.php
	Doctrine/RepositoryManager.php
	Finder/TransformedFinder.php
	Paginator/PaginatorAdapterInterface.php
	Paginator/RawPaginatorAdapter.php
	Persister/ObjectPersister.php
	Propel/ElasticaToModelTransformer.php
	Subscriber/PaginateElasticaQuerySubscriber.php
	Tests/DataCollector/ElasticaDataCollectorTest.php
	Tests/Doctrine/AbstractProviderTest.php
	Tests/Doctrine/RepositoryManagerTest.php
	Tests/Manager/RepositoryManagerTest.php
	Tests/RepositoryTest.php
	Transformer/ElasticaToModelTransformerCollection.php
	composer.json
2013-03-27 14:58:34 -04:00
Jeremy Mikola 3fb9aaa56a Rename FOQ namespaces and services to FOS 2013-03-27 13:44:06 -04:00
cevou cbe6071969 Code cleanup
- updated deprecated calls
- cleaned up PHPDoc comments
2013-03-02 12:23:44 +01:00
Sébastien Lavoie 408b7aeebe Changed ObjectPersiter::transformToElasticaDocument from protected to public to allow usage as a converter service 2012-05-29 14:28:20 -04:00
Richard Miller 1d2887a83b Cleaned up doctrine removal fix changes 2012-01-26 09:59:58 +00:00
Richard Miller 65be0a415e Fixing issue with removing mapped Doctrine entities/documents 2012-01-25 19:51:10 +00:00
Richard Miller fe3d4e06b7 Removed exception catching in persister 2012-01-12 19:54:35 +00:00
ornicar 451a5b4fc2 Remove mapping and setting registries, use the reseter to configure the indexes 2011-09-12 18:28:59 +02:00
ornicar e83a3344e9 Add a setting registry 2011-09-12 17:33:00 +02:00
ornicar 214250416a Replace the type inspector with a mapping registry to improve performances 2011-06-07 14:19:50 -07:00
ornicar 074c596994 Apply @Stof comments 2011-06-07 11:48:11 -07:00
ornicar 022d56b195 Fix logger type hint, make it optional 2011-06-07 11:28:39 -07:00
ornicar 6fee4131f4 Doctrine integration refactoring, adds realtime index updates 2011-06-07 11:16:19 -07:00