jaisonbi edited a comment on pull request #2213:
URL: https://github.com/apache/lucene-solr/pull/2213#issuecomment-771296030


   If I understood correctly, the route via PerFieldDocValuesFormat need to 
change the usage of SortedSetDocValues.
   The idea is adding another constructor for enabling terms dict compression, 
as below:
   ```
   public SortedSetDocValuesField(String name, BytesRef bytes, boolean 
compression) {
       super(name, compression ? COMPRESSION_TYPE: TYPE);
       fieldsData = bytes;
   }
   ```
   And below is the definition of COMPRESSION_TYPE:
   
     ```
   public static final FieldType COMPRESSION_TYPE = new FieldType();
     static {
       COMPRESSION_TYPE.setDocValuesType(DocValuesType.SORTED_SET);
       // add one new attribute for telling PerFieldDocValuesFormat that terms 
dict compression is enabled for this field
       COMPRESSION_TYPE.putAttribute("docvalue.sortedset.compression", "true");
       COMPRESSION_TYPE.freeze();
     }
   ```
   Not sure if I've got it right :)
   
   @msokolov @bruno-roustant 
   


----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to