lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Miller (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-3214) 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.
Date Thu, 08 Mar 2012 00:30:57 GMT

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

Mark Miller commented on SOLR-3214:
-----------------------------------

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


Mime
View raw message