| 1 | module Groonga |
| 2 | class Accessor |
| 3 | include Indexable |
| 4 | |
| 5 | private :estimate_size_for_query |
| 6 | |
| 7 | # Estimate the number of matched records for query. |
| 8 | # |
| 9 | # @overload estimate_size(:query => query) |
| 10 | # @return [Integer] the number of matched records for the query. |
| 11 | def estimate_size(query: nil, **kw_args) |
| 12 | if query |
| 13 | return estimate_size_for_query(query, **kw_args) |
| 14 | end |
| 15 | |
| 16 | message = "must specify :query: #{kw_args.inspect}" |
| 17 | raise InvalidArgument, message |
| 18 | end |
| 19 | end |
| 20 | end |