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

Grant Ingersoll commented on SOLR-1298:
---------------------------------------

{quote}I think that the proper approach is to separate the stored fields from 
other "fields.. perhaps even put it in a separate "meta-data" section under the 
document. But once you do that, again, for the sake of consistency, it would 
also be wise not to include these fields/functions in the "fl" parameter. So 
the "fl" parameter will refer to fields, and another parameter "meta" will 
refer to meta-data values.{quote}

I think they should be inline, as they are just values associated with a 
document.  I think putting it in some other list is sticking too literally to 
what Lucene calls a field, which I don't think Solr has to do that.  One could 
easily imagine a Solr component that brought in a database or other storage 
repository for supplementary fields and it should all be seamless to the 
client.   

If we step back and think about the use case for this functionality it is that 
one wants the output of the function closely associated with the document.  I 
don't want to have to go look it up in some other list while I am iterating 
over my results when all the other values I'm displaying/using are right there 
associated with the document.  That being said, it could be useful to add an 
attribute that indicates it is a generated name, but in reality, that is 
inferred by the field name anyway, as in:
{code}
<doc>
<field name="pow(foo,2)">64</field>
<field name="foo">8</field>
</doc>
{code}

I'd even argue that highlighter results should be inline, too, but that is a 
different issue and a bigger can of worms since it has a well used API already.

> FunctionQuery results as pseudo-fields
> --------------------------------------
>
>                 Key: SOLR-1298
>                 URL: https://issues.apache.org/jira/browse/SOLR-1298
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Grant Ingersoll
>            Assignee: Grant Ingersoll
>            Priority: Minor
>             Fix For: 1.5
>
>         Attachments: SOLR-1298-FieldValues.patch, SOLR-1298.patch
>
>
> It would be helpful if the results of FunctionQueries could be added as 
> fields to a document. 
> Couple of options here:
> 1. Run FunctionQuery as part of relevance score and add that piece to the 
> document
> 2. Run the function (not really a query) during Document/Field retrieval

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

Reply via email to