ngw
ngw

Reputation: 1282

Searchkick as a client only

I'm working at a Ruby software which is divided in services (not micro, just services). Some of these services have the Searchkick gem installed (https://github.com/ankane/searchkick) and index data by calling the usual Searchkick methods in the models.

Then I have a Search service, in charge of performing these searches, which doesn't have any model.

Is there a way to use Searchkick and its beautiful API as a client only, without the indexing part. I'm really struggling, even if I just attempt to create empty classes it fails apparently searching for data in my database - which I don't have.

Thanks in advance.

Upvotes: 0

Views: 101

Answers (1)

Rainie
Rainie

Reputation: 74

As far as I understand you want to leverage Searchkick's querying API without using its indexing features.You can config Searchkick to act in a read-only mode

searchkick callbacks: false

Upvotes: 0

Related Questions