Duplicate tracking when Searchkick execute => false
jfloff opened this issue · comments
I was debugging some tracking and found out that if I have a Searchkick query with
execute: false and then later on, I use the multi search like this:
Searchkick.multi_search([query]) I got 3 entries on Searchjoy just from that one query.
You are right, after your answer I was able to narrow it down a bit more and found out that some actions are triggering multiple Searchjoy entries. This was one of my test cases:
products = Product.search("apples") 5.times do products.suggestions end
This is creating 5 entries on Searchjoy. I suspect other actions such as getting the results, are also creating multiple Searchjoy entries. Looks like Searchjoy is not taking into consideration that the data is already loaded and any method call is accounted as a search.
Hey @jfloff, I'm not able to reproduce that either (with Searchjoy 0.3.2 and Searchkick 3 and 4). I just pushed a new version (Searchjoy 0.4.0) to add tracking to
Searchkick.multi_search. If you're still having issues with the latest version, please create a PR a with a failing test case.