[
https://issues.apache.org/jira/browse/LUCENE-7091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15189769#comment-15189769
]
David Smiley commented on LUCENE-7091:
--------------------------------------
Cool.
Instead of DocValuesHolder, how about actually having one implementation class
per DocValues type that holds the value. So, a MemoryNumericDocValues for
example. In your patch you do an anonymous class for each one but I think it
would be clearer to not do that and eliminate the DocValuesHolder which is
holding for multiple types of values at once which is a little confusing. Note
SortedDocValues extends BinaryDocValues so that eliminates an implementation.
I wish Lucene's DocValue abstractions were interfaces and not abstract classes
since it prevents collapsing some other similar implementations into fewer
concrete classes.
Could you move fields() above MemoryFields so it reads more naturally?
Why is there a different sorting approach to sorted numeric vs BytesRef DV
types? The former you add to an array and sort eventually, and the latter you
use a TreeSet. They could both be handled consistently -- array first then
sort later.
I noticed the BytesRefs DV data isn't copied; we retain a reference. Is that
allowed? I suspect not; seems very risky. Notice that the term index data uses
BytesRefHash wrapped around the shared ByteBlockPool. Perhaps we should do
similarly using the same ByteBlockPool.
> Add doc values support to MemoryIndex
> -------------------------------------
>
> Key: LUCENE-7091
> URL: https://issues.apache.org/jira/browse/LUCENE-7091
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Martijn van Groningen
> Attachments: LUCENE-7091.patch, LUCENE-7091.patch
>
>
> Sometimes queries executed via the MemoryIndex require certain things to be
> stored as doc values. Today this isn't possible because the memory index
> doesn't support this and these queries silently return no results.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]