lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [lucenenet] Shazwazza commented on a change in pull request #291: Fully document Codec Factories and include usage samples (addresses #266)
Date Tue, 23 Jun 2020 05:29:08 GMT

Shazwazza commented on a change in pull request #291:
URL: https://github.com/apache/lucenenet/pull/291#discussion_r443958230



##########
File path: src/Lucene.Net/Codecs/package.md
##########
@@ -22,13 +22,327 @@ summary: *content
 
 Codecs API: API for customization of the encoding and structure of the index.
 
- The Codec API allows you to customise the way the following pieces of index information
are stored: * Postings lists - see <xref:Lucene.Net.Codecs.PostingsFormat> * DocValues
- see <xref:Lucene.Net.Codecs.DocValuesFormat> * Stored fields - see <xref:Lucene.Net.Codecs.StoredFieldsFormat>
* Term vectors - see <xref:Lucene.Net.Codecs.TermVectorsFormat> * FieldInfos - see <xref:Lucene.Net.Codecs.FieldInfosFormat>
* SegmentInfo - see <xref:Lucene.Net.Codecs.SegmentInfoFormat> * Norms - see <xref:Lucene.Net.Codecs.NormsFormat>
* Live documents - see <xref:Lucene.Net.Codecs.LiveDocsFormat> 
+ The Codec API allows you to customize the way the following pieces of index information
are stored:
+
+* Postings lists - see <xref:Lucene.Net.Codecs.PostingsFormat>
+* DocValues - see <xref:Lucene.Net.Codecs.DocValuesFormat>
+* Stored fields - see <xref:Lucene.Net.Codecs.StoredFieldsFormat>
+* Term vectors - see <xref:Lucene.Net.Codecs.TermVectorsFormat>
+* FieldInfos - see <xref:Lucene.Net.Codecs.FieldInfosFormat>
+* SegmentInfo - see <xref:Lucene.Net.Codecs.SegmentInfoFormat>
+* Norms - see <xref:Lucene.Net.Codecs.NormsFormat>
+* Live documents - see <xref:Lucene.Net.Codecs.LiveDocsFormat> 
 
   For some concrete implementations beyond Lucene's official index format, see
   the [Codecs module]({@docRoot}/../codecs/overview-summary.html).
 
- Codecs are identified by name through the Java Service Provider Interface. To create your
own codec, extend <xref:Lucene.Net.Codecs.Codec> and pass the new codec's name to the
super() constructor: public class MyCodec extends Codec { public MyCodec() { super("MyCodecName");
} ... } You will need to register the Codec class so that the {@link java.util.ServiceLoader
ServiceLoader} can find it, by including a META-INF/services/org.apache.lucene.codecs.Codec
file on your classpath that contains the package-qualified name of your codec. 
+ Codecs are identified by name through the <xref:Lucene.Net.Codecs.ICodecFactory> implementation,
which by default is the <xref:Lucene.Net.Codecs.DefaultCodecFactory>. To create your
own codec, extend <xref:Lucene.Net.Codecs.Codec>. By default, the name of the class
(minus the suffix "Codec") will be used as the codec's name.
+ 
+    public class MyCodec : Codec // By default, the name will be "My" because the "Codec"
suffix is removed

Review comment:
       for code blocks its best to use fences and you can specify the language type like (without
spaces)
   
   
   ` ` ` cs
   public class ....
   ` ` `
   
   This avoids any issues with tabbing/spacing and also makes sure the correct highlighting
is applied.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message