Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-3423

add Terms.docCount

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0-ALPHA
    • None
    • None
    • New

    Description

      spinoff from LUCENE-3290, where yonik mentioned:

      Is there currently a way to get the number of documents that have a value in the field?
      Then one could compute the average length of a (sparse) field via sumTotalTermFreq(field)/docsWithField(field)
      docsWithField(field) would be useful in other contexts that want to know how sparse a field is (automatically selecting faceting algorithms, etc).
      

      I think this is a useful stat to add, in case you have sparse fields for heuristics or scoring.

      Attachments

        1. LUCENE-3423.patch
          29 kB
          Robert Muir

        Activity

          People

            rcmuir Robert Muir
            rcmuir Robert Muir
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: