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

Grant Ingersoll commented on SOLR-1566:
---------------------------------------

bq. If we think in terms of spatial distances, then it might be useful to be 
able to sort by the pseudo field? I know we currently resolve that issue by 
sorting by function query, but if you already calculate the distance in some 
other spatial process, might as well be able to sort on it? 

Yeah, that is true, but sorting is such a low level operation and this issue is 
about any component doing it, no matter where in the list it occurs.  I just 
don't see how to make the two sync up w/o having to resort and that would be a 
perf. killer in many ways (CPU and memory).   IMO, I think this piece of 
functionality should be about "marking up" the result set that is going to be 
returned.  

Of course, even with the approach I propose, it has the potential to be a 
memory killer if done wrong.  For instance, I doubt you'd want to stuff in the 
Map every single distance you calculate, you really only want to add those 
items that you know are going to be in the final result list.  Perhaps the 
alternate way is to provide a call back mechanism at Document binding time 
(i.e. the ResponseWriter) where it gives some Interface the document and then 
the implementation can add what it wants per the application.

> Allow components to add fields to outgoing documents
> ----------------------------------------------------
>
>                 Key: SOLR-1566
>                 URL: https://issues.apache.org/jira/browse/SOLR-1566
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>            Reporter: Noble Paul
>            Assignee: Grant Ingersoll
>             Fix For: Next
>
>         Attachments: SOLR-1566.patch, SOLR-1566.patch, SOLR-1566.patch, 
> SOLR-1566.patch
>
>
> Currently it is not possible for components to add fields to outgoing 
> documents which are not in the the stored fields of the document.  This makes 
> it cumbersome to add computed fields/metadata .

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to