mcartright / julien

Toolkit for Information Retrieval research
7 stars 1 forks source link

NPE in stream lengths iterator when using Julien from command line. #2

Closed mcartright closed 11 years ago

mcartright commented 11 years ago

Given this command:

java -jar target/julien-0.1.jar sdm --query="What the hell" --index=/usr/ayr/tmp1/irmarc/data/indexes/julien/aquaint-fielded2/

I get:

Exception in thread "main" java.lang.NullPointerException at org.lemurproject.galago.core.index.disk.DiskLengthsReader$StreamLengthsIterator.reset(DiskLengthsReader.java:135) at org.lemurproject.galago.core.index.disk.DiskLengthsReader$StreamLengthsIterator.(DiskLengthsReader.java:130) at org.lemurproject.galago.core.index.disk.DiskLengthsReader.getIterator(DiskLengthsReader.java:77) at julien.access.Index.lengthsIterator(Index.scala:61) at julien.retrieval.IndexLengths.getIterator(IndexLengths.scala:16) at julien.retrieval.IndexLengths.getIterator(IndexLengths.scala:11) at julien.retrieval.IteratedHook$class.attach(IteratedHook.scala:23) at julien.retrieval.IndexLengths.attach(IndexLengths.scala:11) at julien.cli.examples.SequentialDependenceModel$$anonfun$run$1.apply(SequentialDependenceModel.scala:53) at julien.cli.examples.SequentialDependenceModel$$anonfun$run$1.apply(SequentialDependenceModel.scala:53) at scala.collection.immutable.List.foreach(List.scala:309) at julien.cli.examples.SequentialDependenceModel$.run(SequentialDependenceModel.scala:53) at julien.cli.Julien$.main(Julien.scala:38) at julien.cli.Julien.main(Julien.scala)

WTF?

daltonj commented 11 years ago

The issue is the default key. We talked about "postings" vs. "document". This led to a discussion of the need for a "default" field, e.g. "all". We then have all.postings etc. etc..

mcartright commented 11 years ago

This has been sorted out. "postings" --> "all.postings", and "document" field in lengths renamed to "all". General pattern for accessing fields is now ".postings".