[ https://issues.apache.org/jira/browse/LUCENE-6668?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adrien Grand updated LUCENE-6668: --------------------------------- Attachment: LUCENE-6668.patch Here is a patch: it uses table encoding for SortedSet/SortedNumeric if the sum of the sizes of all unique sets is 256 or less. If my math is correct, this means it will always be used if there are 6 unique values or less (given that the sum of the sizes of all possible subsets would be 192), and might be used if the number of unique values is between 7 and 256. > Optimize SortedSet/SortedNumeric storage for the few unique sets use-case > ------------------------------------------------------------------------- > > Key: LUCENE-6668 > URL: https://issues.apache.org/jira/browse/LUCENE-6668 > Project: Lucene - Core > Issue Type: Improvement > Reporter: Adrien Grand > Assignee: Adrien Grand > Priority: Minor > Attachments: LUCENE-6668.patch > > > Robert suggested this idea: if there are few unique sets of values, we could > build a lookup table and then map each doc to an ord in this table, just like > we already do for table compression for numerics. > I think this is especially compelling given that SortedSet/SortedNumeric are > our two only doc values types that use O(maxDoc) memory because of the > offsets map. When this new strategy is used, memory usage could be bounded to > a constant. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org