Ruby on rail – Acts_as_indexed .with_query () does not return the expected results in the query

Good day,
I have a method for retrieving products in the database that uses the with_query method of Acts_as_indexed:

Product.with_query (query text)

This generates an SQL query as follows:

SELECT Products, * FROM Products WO (products.id IN (NULL)) LIMIT 11

I've already tested replacing .with_query (query_text) with .all, and the results are returned. I have already checked in my model products.rb. I set the fields to gem to work (Acts_as_indexed: Fields => [ :status, :nome ]).

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

Whether the same thing happens on the console

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

Product load (0.6 ms) SELECT Products, * FROM Products WO (products.id IN (NULL)) LIMIT 11