Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove object from index removes complete index #25

Open
thomasblass opened this issue May 6, 2015 · 3 comments
Open

remove object from index removes complete index #25

thomasblass opened this issue May 6, 2015 · 3 comments
Labels

Comments

@thomasblass
Copy link
Contributor

when you have a model with Custom Id Property and not standard-name "persistence_object_identifier", the aspect on the delete method trys to find the Id of the object which was removed. this fails because the object is already deleted so it returns NULL and the call to elastic-search is DELETE/[index]/[type]/

I could track the issue down to "ObjectIndexer.removeObject"

$id = $this->persistenceManager->getIdentifierByObject($object);

Here the Persistence Manager returns NULL

If I change the Aspect to run before, everything works fine:

  • @flow\Before("setting(TYPO3.TYPO3CR.Search.realtimeIndexing.enabled) && within(TYPO3\Flow\Persistence\PersistenceManagerInterface) && method(public .+->(remove)())")

So we have different possible solutions for this:

  1. Change the Aspect
  2. Change how the PersistenceManager->getIdentifierByObject works
  3. do something else ;-)

Can somebody support me for this case please?

@skurfuerst
Copy link
Contributor

Hey Thomas,

Sorry for not responding so long - I was not notified on these issues.

I'd suggest to fix this in the ElasticSearch package.

Thanks a lot for your help,
Sebastian

@dfeyer
Copy link
Contributor

dfeyer commented Nov 16, 2015

As soon as the PSR change is merged I take care to change the aspect to run Before the method remove().

@skurfuerst
Copy link
Contributor

thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants