I am working with a system where I can provide a Lucene query string, but have no access to the Lucene API itself. I only provide a query string and get a list of domain specific result objects.
From my reading so far, it seems that I cannot do the equivalent of a select count(*) where ...
with just the query string, but I am not 100% sure that I understood. Is this correct?
The QueryParser syntax does not include any functions of that sort, no.
The Lucene API provides the count of total matches with it's result set. Solr and ElasticSearch also return the count. If the interface you are using doesn't expose that figure, there isn't any feature of the Lucene QueryParser syntax that will help you gain access to it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With