Ugh, I'll fix this.

With the new flex API, you can't ask a composite (Multi/DirReader) for
its postings -- you have to go through the static methods on
MultiFields.  I'm trying to put some distance b/w IndexReader and
composite readers... because I'd like to eventually deprecate them.
Ie, the composite readers should "hold" an ordered collection of
sub-readers, but should not themselves implement IndexReader's API, I
think.

Thanks for raising this Tom,

Mike

On Wed, Apr 14, 2010 at 2:14 PM, Burton-West, Tom <tburt...@umich.edu> wrote:
> When I try to run HighFreqTerms.java in Lucene Revision: 933722  I get the
> the exception appended below.  I believe the line of code involved is a
> result of the flex indexing merge. Should I post this as a comment to
> LUCENE-2370 (Reintegrate flex branch into trunk)?
>
> Or is there simply something wrong with my configuration?
>
> Exception in thread "main" java.lang.UnsupportedOperationException: please
> use MultiFields.getFields if you really need a top level Fields (NOTE that
> it's usually better to work per segment instead)
>         at
> org.apache.lucene.index.DirectoryReader.fields(DirectoryReader.java:762)
>         at org.apache.lucene.misc.HighFreqTerms.main(HighFreqTerms.java:71)
>
> Tom Burton-West
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to