Uploaded image for project: 'Terrier Core'
  1. Terrier Core
  2. TR-123

Null pointer exception while trying to index simple document.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0, 3.5
    • Fix Version/s: 3.5
    • Component/s: .indexing
    • Labels:
      None

      Description

      /org/terrier/indexing/FileDocument.java

      public Set<String> getFields() {
            return null;
      }

      creates

      java.lang.NullPointerException
              at org.terrier.indexing.BasicIndexer$FieldTermProcessor.processTerm(BasicIndexer.java:112)
              at org.terrier.terms.StemmerTermPipeline.processTerm(StemmerTermPipeline.java:58)
              at org.terrier.indexing.BasicIndexer.createDirectIndex(BasicIndexer.java:240)
              at org.terrier.indexing.Indexer.index(Indexer.java:344)
              at org.terrier.applications.TRECIndexing.index(TRECIndexing.java:123)
              at org.terrier.applications.TrecTerrier.run(TrecTerrier.java:390)
              at org.terrier.applications.TrecTerrier.applyOptions(TrecTerrier.java:573)
              at org.terrier.applications.TrecTerrier.main(TrecTerrier.java:237)

      should be

      + 37 import java.util.Collections;

      167 return Collections.emptySet();

        Attachments

          Activity

          techmind Ilya Bogunov created issue -
          Hide
          craigm Craig Macdonald added a comment -

          Good catch. I have committed this to trunk.

          Show
          craigm Craig Macdonald added a comment - Good catch. I have committed this to trunk.
          craigm Craig Macdonald made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 3.1 [ 10040 ]
          Resolution Fixed [ 1 ]
          Hide
          craigm Craig Macdonald added a comment -

          Ilya, Can you tell me your affiliation?

          Thanks
          Craig

          Show
          craigm Craig Macdonald added a comment - Ilya, Can you tell me your affiliation? Thanks Craig

            People

            • Assignee:
              craigm Craig Macdonald
              Reporter:
              techmind Ilya Bogunov
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: