lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Male (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SOLR-1566) Allow components to add fields to outgoing documents
Date Thu, 12 Aug 2010 12:52:16 GMT

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

Chris Male commented on SOLR-1566:
----------------------------------

bq. 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.

I concur.  I think its best not to do too much stuff in this issue.  If we get pseudo fields
being written out, then later on we can address advanced usages.

bq. 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.

Yup, this is the crux of the issue.

bq. 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.

I just wrote something about how I didn't see how that addressed the problem, but then it
clicked what you are getting at.  Through this Callback you can then re-calculate the distances
for your page of results and  recalculating 10 distances is a nominal cost.

I think thats a really great idea, but I wonder if that shouldn't be an additional process
to what you've already made? For spatial it makes perfect sense, but I wonder whether its
appropriate for other use cases? I'm trying to imagine some use case where the value can only
be captured as part of some convoluted query or analysis process.  Consequently you want to
store it when you can and not at binding time.  But maybe a) those use cases dont exist and
b) We should leave it up to the user to create a storage system that hooks into the callback.



> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message