[jira] Commented: (SOLR-1566) Allow components to add fields to outgoing documents

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-1566) Allow components to add fields to outgoing documents

JIRA jira@apache.org

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

Ryan McKinley commented on SOLR-1566:
-------------------------------------

I just added a path that *almost* works.  Rather then bang my head on it some more, i think some feedback would be great.

Originally, I hoped to clean up the ResponeWriter mess, and make a single place that would 'augment' docs -- but there are *so* many micro optimizations for each format that approach seems difficult.  

Instead I went for an approach the moves Set<String> returnFields to a class that knows more then just a list of strings.  This holds an augmenter that can add to SolrDocument or write to the response.

Now you can make a request like:

http://localhost:8983/solr/select?q=*:*&fl=id,score,_docid_,_shard

and get back a response
{code}
  "response":{"numFound":17,"start":0,"maxScore":1.0,"docs":[
      {
        "id":"GB18030TEST",
        "score":1.0,
        "_docid_":0,
        "_shard_":"getshardid???"},
      {
        "id":"SP2514N",
        "score":1.0,
        "_docid_":1,
        "_shard_":"getshardid???"},
      {
        "id":"6H500F0",
        "features":[
          "SATA 3.0Gb/s, NCQ",
          "8.5ms seek",
          "16MB cache"],
        "score":1.0,
        "_docid_":2,
        "_shard_":"getshardid???"},
...

{code}

right now, _docid_ just returns the lucene docid, and _shard_ returns a constant string saying "getshardid???"

The distributed tests (BasicDistributedZkTest, and TestDistributedSearch) don't pass, but everything else does.  I will wait for general feedback before trying to track that down.

Also looking at SOLR-1298,  I would love some feedback on how we could read function queries and ideally used ones that are already defined elsewhere.






feedback welcome!





> 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-gsi.patch, SOLR-1566-rm.patch, SOLR-1566-rm.patch, SOLR-1566-rm.patch, SOLR-1566-rm.patch, SOLR-1566-rm.patch, 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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