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

Mark Miller edited comment on SOLR-3214 at 3/8/12 12:30 AM:
------------------------------------------------------------

{noformat}
Index: solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
===================================================================
--- solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java    
(revision 1296933)
+++ solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java    
(working copy)
@@ -935,13 +935,14 @@
       // make sure that the id is returned for correlation.
       String fl = sreq.params.get(CommonParams.FL);
       if (fl != null) {
-         fl = fl.trim();
+        fl = fl.trim();
         // currently, "score" is synonymous with "*,score" so
-        // don't add "id" if the fl is empty or "score" or it would change the 
meaning.
-         if (fl.length()!=0 && !"score".equals(fl) && !"*".equals(fl)) {
-           sreq.params.set(CommonParams.FL, fl+','+uniqueField.getName());
-         }
-      }      
+        // don't add "id" if the fl is empty or "score" or it would change the
+        // meaning.
+        if (fl.length() != 0 && !"score".equals(fl) && !"*".equals(fl)) {
+          sreq.params.add(CommonParams.FL, uniqueField.getName());
+        }
+      }
 
       ArrayList<String> ids = new ArrayList<String>(shardDocs.size());
       for (ShardDoc shardDoc : shardDocs) {

{noformat}
                
      was (Author: [email protected]):
    Index: 
solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
===================================================================
--- solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java    
(revision 1296933)
+++ solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java    
(working copy)
@@ -935,13 +935,14 @@
       // make sure that the id is returned for correlation.
       String fl = sreq.params.get(CommonParams.FL);
       if (fl != null) {
-         fl = fl.trim();
+        fl = fl.trim();
         // currently, "score" is synonymous with "*,score" so
-        // don't add "id" if the fl is empty or "score" or it would change the 
meaning.
-         if (fl.length()!=0 && !"score".equals(fl) && !"*".equals(fl)) {
-           sreq.params.set(CommonParams.FL, fl+','+uniqueField.getName());
-         }
-      }      
+        // don't add "id" if the fl is empty or "score" or it would change the
+        // meaning.
+        if (fl.length() != 0 && !"score".equals(fl) && !"*".equals(fl)) {
+          sreq.params.add(CommonParams.FL, uniqueField.getName());
+        }
+      }
 
       ArrayList<String> ids = new ArrayList<String>(shardDocs.size());
       for (ShardDoc shardDoc : shardDocs) {

                  
> If you use multiple fl entries rather than a comma separated list, all but 
> the first entry can be ignored if you are using distributed search.
> ----------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-3214
>                 URL: https://issues.apache.org/jira/browse/SOLR-3214
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>            Reporter: Mark Miller
>            Assignee: Mark Miller
>             Fix For: 4.0
>
>
> I have not checked yet, but prob in 3.x too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to