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

Warnings needed for sorting on non existant or non indexed fields

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • None
    • None
    • core/search
    • None
    • Operating System: other
      Platform: Other

    • 34477

    Description

      While it's possible to search for fields that don't exist (you'll get 0 hits),
      you'll get an exception if you try to sort by a field that has no values. The
      exception is this:

      if (termEnum.term() == null) {
      throw new RuntimeException ("no terms in field " + field);
      }

      I'll attach a change suggested by Yonik Seeley that removes this exception.

      Also, the if-condition above is incomplete anyway, so currently the exception
      is not always thrown (as termEnum .term() might well be != null but point to a
      term in a different field already)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              daniel.naber@t-online.de Daniel Naber
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: