pdphilip / laravel-elasticsearch

Laravel Elasticsearch: An Elasticsearch implementation of Laravel's Eloquent ORM
MIT License
86 stars 16 forks source link

A few things I came across #12

Closed jayjfletcher closed 6 months ago

jayjfletcher commented 7 months ago

A few small issues I came across during the usage of this package.

Forward slashes in queries would bomb out, so I added '/' to the special chars escaped before a query. It would be nice if this array was configurable from outside the package.

The other issue I came across was the newEloquentBuilder method in the HybridRelations trait. It was returning the same builder no matter what the parent model class was.

pdphilip commented 7 months ago

Thank you @jayjfletcher,

PR looks good, but just to make sure I understand the holes being patched, could you provide me with an example for two touchpoints? The tests for the package are here: https://github.com/pdphilip/laravel-elasticsearch-tests and I would like to include these in there.

(Alternatively, feel free to a PR on the test package itself)

Appreciate your contribution!