Indatus / ranger

MIT License
84 stars 7 forks source link

[Question] Override search behavior #2

Closed lahaxearnaud closed 10 years ago

lahaxearnaud commented 10 years ago

I don't find informations about the possibility to override the behavior of the Searcher.

In my case I have an Elastic Search to index my data.

Is it possible, to catch the request (only for one controller) and execute a custom search ?

Thanks for this package.

Sincerly,

Arnaud LAHAXE

cegrif01 commented 10 years ago

As of now the only way to do this is by extending the service provider which would make your custom search work for every controller. I'm going to have to make some modifications to allow this. I will work on this.

In the meantime you could extend the service provider and pass in your implementation of my Searcher.php class. Then you could write some logic to account for those custom circumstances. I should have the proper fix for this by Thursday or Friday. Let me know if you need help extending the service provider. It can be a little tricky but very useful to know.

lahaxearnaud commented 10 years ago

Thank you for this detailed answer.

Il will take a look to the provider this evening.

Sincerly,

Arnaud LAHAXE