doctrine / search

Generic Search extension for indexing and querying ODM/ORM objects with different text-search engine implementations
http://www.doctrine-project.org
MIT License
273 stars 52 forks source link

Changed check of ID existence before persisting in order to allow elasti... #86

Closed sydekumf closed 10 years ago

sydekumf commented 10 years ago

...csearch create its own ids

It is possible to omit the id for elasticsearch. It will then create its own id. The elastica client does this if you give it an empty string as id. Unfortunately the doctrine/search lib will not accept an empty string, so I changed line 196 in order allow empty strings.

MrHash commented 10 years ago

There is yet another issue with allowing ElasticSearch to determine the id which is that this library does not set the ID back onto the object. This could create application issues so we need a more robust solution.

MrHash commented 10 years ago

If it's ok i'll close this pull request? There are a number of issues that need to be resolved unless you have some more feedback.

sydekumf commented 10 years ago

You're right with the multiple entities, I haven't tried that. You can close this issue, I will try some work arounds, maybe I get a solution :-)