mirror of https://github.com/apache/lucene.git
LUCENE-4055: fix class naming
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4055@1341620 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
73b5071b89
commit
ae439f4929
|
@ -36,7 +36,7 @@ import org.apache.lucene.codecs.TermVectorsFormat;
|
||||||
public final class SimpleTextCodec extends Codec {
|
public final class SimpleTextCodec extends Codec {
|
||||||
private final PostingsFormat postings = new SimpleTextPostingsFormat();
|
private final PostingsFormat postings = new SimpleTextPostingsFormat();
|
||||||
private final StoredFieldsFormat storedFields = new SimpleTextStoredFieldsFormat();
|
private final StoredFieldsFormat storedFields = new SimpleTextStoredFieldsFormat();
|
||||||
private final SegmentInfoFormat segmentInfos = new SimpleTextSegmentInfosFormat();
|
private final SegmentInfoFormat segmentInfos = new SimpleTextSegmentInfoFormat();
|
||||||
private final FieldInfosFormat fieldInfosFormat = new SimpleTextFieldInfosFormat();
|
private final FieldInfosFormat fieldInfosFormat = new SimpleTextFieldInfosFormat();
|
||||||
private final TermVectorsFormat vectorsFormat = new SimpleTextTermVectorsFormat();
|
private final TermVectorsFormat vectorsFormat = new SimpleTextTermVectorsFormat();
|
||||||
// TODO: need a plain-text impl
|
// TODO: need a plain-text impl
|
||||||
|
|
|
@ -33,9 +33,9 @@ import org.apache.lucene.index.SegmentInfo;
|
||||||
* <b><font color="red">FOR RECREATIONAL USE ONLY</font></B>
|
* <b><font color="red">FOR RECREATIONAL USE ONLY</font></B>
|
||||||
* @lucene.experimental
|
* @lucene.experimental
|
||||||
*/
|
*/
|
||||||
public class SimpleTextSegmentInfosFormat extends SegmentInfoFormat {
|
public class SimpleTextSegmentInfoFormat extends SegmentInfoFormat {
|
||||||
private final SegmentInfoReader reader = new SimpleTextSegmentInfosReader();
|
private final SegmentInfoReader reader = new SimpleTextSegmentInfoReader();
|
||||||
private final SegmentInfoWriter writer = new SimpleTextSegmentInfosWriter();
|
private final SegmentInfoWriter writer = new SimpleTextSegmentInfoWriter();
|
||||||
|
|
||||||
public static final String SI_EXTENSION = "si";
|
public static final String SI_EXTENSION = "si";
|
||||||
|
|
|
@ -38,7 +38,7 @@ import org.apache.lucene.util.BytesRef;
|
||||||
import org.apache.lucene.util.IOUtils;
|
import org.apache.lucene.util.IOUtils;
|
||||||
import org.apache.lucene.util.StringHelper;
|
import org.apache.lucene.util.StringHelper;
|
||||||
|
|
||||||
import static org.apache.lucene.codecs.simpletext.SimpleTextSegmentInfosWriter.*;
|
import static org.apache.lucene.codecs.simpletext.SimpleTextSegmentInfoWriter.*;
|
||||||
|
|
||||||
// nocommit rename (remove s)
|
// nocommit rename (remove s)
|
||||||
|
|
||||||
|
@ -48,12 +48,12 @@ import static org.apache.lucene.codecs.simpletext.SimpleTextSegmentInfosWriter.*
|
||||||
* <b><font color="red">FOR RECREATIONAL USE ONLY</font></B>
|
* <b><font color="red">FOR RECREATIONAL USE ONLY</font></B>
|
||||||
* @lucene.experimental
|
* @lucene.experimental
|
||||||
*/
|
*/
|
||||||
public class SimpleTextSegmentInfosReader extends SegmentInfoReader {
|
public class SimpleTextSegmentInfoReader extends SegmentInfoReader {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SegmentInfo read(Directory directory, String segmentName, IOContext context) throws IOException {
|
public SegmentInfo read(Directory directory, String segmentName, IOContext context) throws IOException {
|
||||||
BytesRef scratch = new BytesRef();
|
BytesRef scratch = new BytesRef();
|
||||||
String segFileName = IndexFileNames.segmentFileName(segmentName, "", SimpleTextSegmentInfosFormat.SI_EXTENSION);
|
String segFileName = IndexFileNames.segmentFileName(segmentName, "", SimpleTextSegmentInfoFormat.SI_EXTENSION);
|
||||||
IndexInput input = directory.openInput(segFileName, context);
|
IndexInput input = directory.openInput(segFileName, context);
|
||||||
boolean success = false;
|
boolean success = false;
|
||||||
try {
|
try {
|
|
@ -43,7 +43,7 @@ import org.apache.lucene.util.IOUtils;
|
||||||
* <b><font color="red">FOR RECREATIONAL USE ONLY</font></B>
|
* <b><font color="red">FOR RECREATIONAL USE ONLY</font></B>
|
||||||
* @lucene.experimental
|
* @lucene.experimental
|
||||||
*/
|
*/
|
||||||
public class SimpleTextSegmentInfosWriter extends SegmentInfoWriter {
|
public class SimpleTextSegmentInfoWriter extends SegmentInfoWriter {
|
||||||
|
|
||||||
final static BytesRef SI_VERSION = new BytesRef(" version ");
|
final static BytesRef SI_VERSION = new BytesRef(" version ");
|
||||||
final static BytesRef SI_DOCCOUNT = new BytesRef(" number of documents ");
|
final static BytesRef SI_DOCCOUNT = new BytesRef(" number of documents ");
|
||||||
|
@ -60,7 +60,7 @@ public class SimpleTextSegmentInfosWriter extends SegmentInfoWriter {
|
||||||
@Override
|
@Override
|
||||||
public void write(Directory dir, SegmentInfo si, FieldInfos fis, IOContext ioContext) throws IOException {
|
public void write(Directory dir, SegmentInfo si, FieldInfos fis, IOContext ioContext) throws IOException {
|
||||||
|
|
||||||
String segFileName = IndexFileNames.segmentFileName(si.name, "", SimpleTextSegmentInfosFormat.SI_EXTENSION);
|
String segFileName = IndexFileNames.segmentFileName(si.name, "", SimpleTextSegmentInfoFormat.SI_EXTENSION);
|
||||||
si.getFiles().add(segFileName);
|
si.getFiles().add(segFileName);
|
||||||
|
|
||||||
boolean success = false;
|
boolean success = false;
|
|
@ -42,7 +42,7 @@ public class PreFlexRWCodec extends Lucene3xCodec {
|
||||||
private final Lucene3xNormsFormat norms = new PreFlexRWNormsFormat();
|
private final Lucene3xNormsFormat norms = new PreFlexRWNormsFormat();
|
||||||
private final FieldInfosFormat fieldInfos = new PreFlexRWFieldInfosFormat();
|
private final FieldInfosFormat fieldInfos = new PreFlexRWFieldInfosFormat();
|
||||||
private final TermVectorsFormat termVectors = new PreFlexRWTermVectorsFormat();
|
private final TermVectorsFormat termVectors = new PreFlexRWTermVectorsFormat();
|
||||||
private final SegmentInfoFormat segmentInfos = new PreFlexRWSegmentInfosFormat();
|
private final SegmentInfoFormat segmentInfos = new PreFlexRWSegmentInfoFormat();
|
||||||
private final StoredFieldsFormat storedFields = new PreFlexRWStoredFieldsFormat();
|
private final StoredFieldsFormat storedFields = new PreFlexRWStoredFieldsFormat();
|
||||||
// TODO: this should really be a different impl
|
// TODO: this should really be a different impl
|
||||||
private final LiveDocsFormat liveDocs = new Lucene40LiveDocsFormat();
|
private final LiveDocsFormat liveDocs = new Lucene40LiveDocsFormat();
|
||||||
|
|
|
@ -22,8 +22,8 @@ import org.apache.lucene.codecs.SegmentInfoWriter;
|
||||||
/**
|
/**
|
||||||
* @lucene.experimental
|
* @lucene.experimental
|
||||||
*/
|
*/
|
||||||
class PreFlexRWSegmentInfosFormat extends Lucene3xSegmentInfoFormat {
|
class PreFlexRWSegmentInfoFormat extends Lucene3xSegmentInfoFormat {
|
||||||
private final SegmentInfoWriter writer = new PreFlexRWSegmentInfosWriter();
|
private final SegmentInfoWriter writer = new PreFlexRWSegmentInfoWriter();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SegmentInfoWriter getSegmentInfosWriter() {
|
public SegmentInfoWriter getSegmentInfosWriter() {
|
|
@ -37,7 +37,7 @@ import org.apache.lucene.util.IOUtils;
|
||||||
* PreFlex implementation of {@link SegmentInfoWriter}.
|
* PreFlex implementation of {@link SegmentInfoWriter}.
|
||||||
* @lucene.experimental
|
* @lucene.experimental
|
||||||
*/
|
*/
|
||||||
class PreFlexRWSegmentInfosWriter extends SegmentInfoWriter {
|
class PreFlexRWSegmentInfoWriter extends SegmentInfoWriter {
|
||||||
|
|
||||||
// NOTE: this is not "really" 3.x format, because we are
|
// NOTE: this is not "really" 3.x format, because we are
|
||||||
// writing each SI to its own file, vs 3.x where the list
|
// writing each SI to its own file, vs 3.x where the list
|
Loading…
Reference in New Issue