mirror of https://github.com/apache/lucene.git
LUCENE-3728: handle separate norms more privately inside 3.x codec
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene3661@1237261 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1f5e23be14
commit
80bf691b3b
|
@ -39,13 +39,4 @@ public abstract class NormsFormat {
|
|||
*/
|
||||
@Deprecated
|
||||
public void separateFiles(Directory dir, SegmentInfo info, Set<String> files) throws IOException {};
|
||||
|
||||
/**
|
||||
* Note: this should not be overridden!
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public PerDocProducer docsProducer(SegmentReadState state, Directory separateNormsDir) throws IOException {
|
||||
return docsProducer(state);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,12 +56,6 @@ public class Lucene3xNormsFormat extends NormsFormat {
|
|||
|
||||
@Override
|
||||
public PerDocProducer docsProducer(SegmentReadState state) throws IOException {
|
||||
return docsProducer(state, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PerDocProducer docsProducer(SegmentReadState state,
|
||||
Directory separateNormsDir) throws IOException {
|
||||
return new Lucene3xNormsProducer(state.dir, state.segmentInfo, state.fieldInfos, state.context, separateNormsDir);
|
||||
return new Lucene3xNormsProducer(state.dir, state.segmentInfo, state.fieldInfos, state.context);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,7 +67,8 @@ class Lucene3xNormsProducer extends PerDocProducer {
|
|||
|
||||
// note: just like segmentreader in 3.x, we open up all the files here (including separate norms) up front.
|
||||
// but we just don't do any seeks or reading yet.
|
||||
public Lucene3xNormsProducer(Directory dir, SegmentInfo info, FieldInfos fields, IOContext context, Directory separateNormsDir) throws IOException {
|
||||
public Lucene3xNormsProducer(Directory dir, SegmentInfo info, FieldInfos fields, IOContext context) throws IOException {
|
||||
Directory separateNormsDir = info.dir; // separate norms are never inside CFS
|
||||
maxdoc = info.docCount;
|
||||
String segmentName = info.name;
|
||||
Map<Integer,Long> normGen = info.getNormGen();
|
||||
|
|
|
@ -119,7 +119,7 @@ final class SegmentCoreReaders {
|
|||
// ask codec for its Norms:
|
||||
// TODO: since we don't write any norms file if there are no norms,
|
||||
// kinda jaky to assume the codec handles the case of no norms file at all gracefully?!
|
||||
norms = codec.normsFormat().docsProducer(segmentReadState, dir);
|
||||
norms = codec.normsFormat().docsProducer(segmentReadState);
|
||||
perDocProducer = codec.docValuesFormat().docsProducer(segmentReadState);
|
||||
|
||||
final Directory storeDir;
|
||||
|
|
Loading…
Reference in New Issue