: I guess you could hack a "all norms are 1" behavior by
: writing something similar to OneNormsReader in
: org.apache.lucene.demo.SearchFiles.
Wow ... that's quite the little hidden gem in the Demo.
The gist of the impl is pretty much exactly what you need, but
SegmentReader has a static utility to make things easy...
public class FlatNormsIndexReader extends FilterIndexReader {
public FlatNormsIndexReader(IndexReder r) { super(r); }
public byte[] norms(String field) {
return SegmentReader.createFakeNorms(maxDoc());
}
}
-Hoss
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]