There are some same points between filter and query when I use Java api. What are the differences between them? When we send the same request, which one can return the response faster?
Use filters!
They generate a bitset that is cached, so future queries that use the filter can reuse it, which makes things really fast