ruby on rails – Acts_as_indexed .with_query () does not return the expected results in the query

Good afternoon
I have a method to retrieve products in the database that uses the with_query method of gem act_as_indexed:

Product.with_query (query_text)

This generates an SQL query like this:

SELECT products. * DE products WHERE (products.id IN (NULL)) LIMIT 11

I've already tested replacing .with_query (query_text) with .all and the results are returned. I've already checked my model products.rb I've configured the fields so that they work (act_as_indexed: fields => [ :status, :nome ]).

Does anyone have any idea why the gem returns WHERE (products.id IN (NULL)) in the query?
Thank you

Obs the same thing is happening on the console

Product.with_query (& # 39; Pump & # 39;)

Product Charge (0.6ms) SELECT products. * DE products WHERE (products.id IN (NULL)) LIMIT 11