[TR-26] SingleLineTRECQuery doesnt parse Million Query track topics files Created: 31/Mar/09  Updated: 07/Apr/09  Resolved: 07/Apr/09

Status: Resolved
Project: Terrier Core
Component/s: None
Affects Version/s: 2.2.1
Fix Version/s: None

Type: Improvement Priority: Trivial
Reporter: Craig Macdonald Assignee: Craig Macdonald
Resolution: Fixed  
Labels: None

Attachments: File TR-26.v1.patch    

 Description   
ERROR - Error instantiating topic file tokeniser called SingleLineTRECQuery
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at uk.ac.gla.terrier.applications.TRECQuerying.getQueryParser(TRECQuerying.java:469)
        at uk.ac.gla.terrier.applications.TRECQuerying.<init>(TRECQuerying.java:155)
        at TrecTerrier.run(TrecTerrier.java:416)
        at TrecTerrier.applyOptions(TrecTerrier.java:565)
        at TrecTerrier.main(TrecTerrier.java:244)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1938)
        at uk.ac.gla.terrier.structures.SingleLineTRECQuery.extractQuery(SingleLineTRECQuery.java:103)
        at uk.ac.gla.terrier.structures.TRECQuery.<init>(TRECQuery.java:197)
        at uk.ac.gla.terrier.structures.SingleLineTRECQuery.<init>(SingleLineTRECQuery.java:66)
        ... 9 more

 Comments   
Comment by Craig Macdonald [ 31/Mar/09 ]

Cause is that TREC single line topic files may not have a space, but just a colon. Simple patch attached.

Comment by Craig Macdonald [ 07/Apr/09 ]

Committed to trunk.

Generated at Fri Nov 15 11:21:56 GMT 2019 using JIRA 7.1.1#71004-sha1:d6b2c0d9b7051e9fb5e4eb8ce177ca56d91d7bd8.