Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: None
    • Component/s: core/termvectors
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      getTermFreqVector(int, TermVectorMapper) never calls the mapper if there is no term vector, consitent with all the other getTermFreqVector methods that returns null.

      getTermFreqVector(int, String, TermVectorMapper) throws an IOException when a field does not contain the term vector.

      My suggestion:

      Index: src/java/org/apache/lucene/index/SegmentReader.java
      ===================================================================
      --- src/java/org/apache/lucene/index/SegmentReader.java (revision 590149)
      +++ src/java/org/apache/lucene/index/SegmentReader.java (working copy)
      @@ -648,7 +648,7 @@
           ensureOpen();
           FieldInfo fi = fieldInfos.fieldInfo(field);
           if (fi == null || !fi.storeTermVector || termVectorsReaderOrig == null)
      -      throw new IOException("field does not contain term vectors");
      +      return; 
      

        Activity

        Hide
        gsingers Grant Ingersoll added a comment -

        There seems to be some inconsistency across the board with all the methods here. I'll have to dig into the history here of the older methods and see what is the best solution. We probably should have the same across the board, instead of the grab bag approach now in place.

        Show
        gsingers Grant Ingersoll added a comment - There seems to be some inconsistency across the board with all the methods here. I'll have to dig into the history here of the older methods and see what is the best solution. We probably should have the same across the board, instead of the grab bag approach now in place.
        Hide
        gsingers Grant Ingersoll added a comment -

        committed, thanks Karl!

        Show
        gsingers Grant Ingersoll added a comment - committed, thanks Karl!

          People

          • Assignee:
            gsingers Grant Ingersoll
            Reporter:
            karl.wettin Karl Wettin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development