cakephp / elastic-search

Elastic search datasource for CakePHP
Other
88 stars 53 forks source link

Add IsUique rule, Add 'refresh' #171

Closed josbeir closed 6 years ago

josbeir commented 6 years ago
saeideng commented 6 years ago

why are you not using cake Cake\ORM\Rule\IsUnique class ?

josbeir commented 6 years ago

@saeideng Because the query syntax from the ORM one is made specifically for SQL based queries. Not the ones from the ES ORM... This one is a bit simpler too, it does not rely on dynamic PK's (_id is required in ES) and doesn't need aliases or multiple null values.

Nothing from cake's ORM is currently used in this plugin (and thats a good thing)

josbeir commented 6 years ago

Added a 'refresh' option, can be usefull when using ES for CRUD operations in the browser where a result on a query is expected immediately after an operation.

lorenzo commented 6 years ago

Thanks, I like this change!