: I noticed that apache solr 4.2 uses the lucene codec 4.1. How can I
: switch to 4.2?

Unless you've configured something oddly, Solr is already using the 4.2 
codec.  

What you are probably seeing is that the fileformat for several types of 
files hasn't changed from the 4.1 (or even 4.0) versions, so they are 
still used in 4.2 (and confusingly include "Lucene41" in the filenames in 
several cases).

Note that in the 4.2 codec package javadocs, several codec related classes 
are not implemented, and the docs link back to the 4.1 and 4.0 
implementations...

https://lucene.apache.org/core/4_2_0/core/org/apache/lucene/codecs/lucene42/package-summary.html

If you peek inside the Lucene42Codec class you'll also see...

  private final StoredFieldsFormat fieldsFormat = new 
Lucene41StoredFieldsFormat();
  private final TermVectorsFormat vectorsFormat = new 
Lucene42TermVectorsFormat();
  private final FieldInfosFormat fieldInfosFormat = new 
Lucene42FieldInfosFormat();
  private final SegmentInfoFormat infosFormat = new Lucene40SegmentInfoFormat();
  private final LiveDocsFormat liveDocsFormat = new Lucene40LiveDocsFormat();

-Hoss

Reply via email to