2

Can Lucene counts documents after having grouped them by a NumericField?

Only counting, not loading all documents content.

femtoRgon
  • 32,893
  • 7
  • 60
  • 87
Slim
  • 1,256
  • 1
  • 13
  • 25

2 Answers2

2

Faceting queries may be what you are after. Specifically a range faceting query.

Gunnar
  • 18,095
  • 1
  • 53
  • 73
1

When you have your results you can try

results.totalHits;

if I understood you

Paweł
  • 146
  • 11