ParallelReader supplied to BoboIndexReader.getInstance causes UnsupportedOperationException

Description

Steps to reproduce the problem :

1. Create an org.apache.lucene.index.ParallelReader with readers added as appropriate.
2. Call BoboIndexReader.getInstance(...) with the newly created ParallelReader and facetHandlers as appropriate.

Results in : 'java.lang.UnsupportedOperationException: This reader does not support this method.'

This bug appears to be as a result of bug fix bobo-31.

As seen by stack trace below the exception is caused by the call to
_dir = reader.directory();
on line 548. A ParallelReader does not have a directory assigned to it.

Caused by: java.lang.UnsupportedOperationException: This reader does not support this method.
at org.apache.lucene.index.IndexReader.directory(IndexReader.java:592)
at com.browseengine.bobo.api.BoboIndexReader.<init>(BoboIndexReader.java:548)
at com.browseengine.bobo.api.BoboIndexReader.<init>(BoboIndexReader.java:526)
at com.browseengine.bobo.api.BoboIndexReader.getInstance(BoboIndexReader.java:140)
at com.browseengine.bobo.api.BoboIndexReader.getInstance(BoboIndexReader.java:132)

Environment

OS X and Ubuntu

Assignee

Yasuhiro Matsuda

Reporter

James Stevenson

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure