[ 
https://issues.apache.org/jira/browse/SOLR-8220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14977592#comment-14977592
 ] 

Erick Erickson commented on SOLR-8220:
--------------------------------------

I'm not talking about sorting here. The sorting during scoring certainly uses 
DV values.

Here's the sequence (two shards, no followers, rows=10, illustrating with just 
the action on shard2)
1> shard1 gets the incoming request
2> shard1 sends a sub-request for candidate top 10 to shard2
3> shard2 returns its candidate top 10 to shard1. This return packet has the 
top 10 doc IDs and sort criteria.
4>  shard1 combines the lists of candidate top 10 docs and picks the true top 10
5> shard1 asks shard2 for the docs that came from shard2 and made it into the 
sorted top 10 list.

What I'm talking about is step <3>. Last I knew, this did not use the DV 
fields, but pulled the stored value thus decompressing. 

I'm not sure how this is resolved for fields that aren't stored, there must be 
a fallback. Or I'm missing something here, wouldn't be the first time. Maybe 
Yonik's idea of making DV fields more "first class citizens" would just take 
care of the issue entirely.

> Read field from docValues for non stored fields
> -----------------------------------------------
>
>                 Key: SOLR-8220
>                 URL: https://issues.apache.org/jira/browse/SOLR-8220
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Keith Laban
>
> Many times a value will be both stored="true" and docValues="true" which 
> requires redundant data to be stored on disk. Since reading from docValues is 
> both efficient and a common practice (facets, analytics, streaming, etc), 
> reading values from docValues when a stored version of the field does not 
> exist would be a valuable disk usage optimization.
> The only caveat with this that I can see would be for multiValued fields as 
> they would always be returned sorted in the docValues approach. I believe 
> this is a fair compromise.
> I've done a rough implementation for this as a field transform, but I think 
> it should live closer to where stored fields are loaded in the 
> SolrIndexSearcher.
> Two open questions/observations:
> 1) There doesn't seem to be a standard way to read values for docValues, 
> facets, analytics, streaming, etc, all seem to be doing their own ways, 
> perhaps some of this logic should be centralized.
> 2) What will the API behavior be? (Below is my proposed implementation)
> Parameters for fl:
> - fl="docValueField"
>   -- return field from docValue if the field is not stored and in docValues, 
> if the field is stored return it from stored fields
> - fl="*"
>   -- return only stored fields
> - fl="+"
>    -- return stored fields and docValue fields
> 2a - would be easiest implementation and might be sufficient for a first 
> pass. 2b - is current behavior



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to