[jira] [Created] (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.

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (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.

Sebastian Nagel (Jira)
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Sebastian Nagel (Jira)

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

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

{noformat}
Index: solr/core/src/test/org/apache/solr/TestDistributedSearch.java
===================================================================
--- solr/core/src/test/org/apache/solr/TestDistributedSearch.java (revision 1296933)
+++ solr/core/src/test/org/apache/solr/TestDistributedSearch.java (working copy)
@@ -135,7 +135,10 @@
     //is agnostic of request params.
     handle.remove("maxScore");
     query("q","{!func}"+i1, "fl","*,score");  // even scores should match exactly here
-
+    
+    // multple fl entries
+    query("q","*:*", "fl","id", "fl", t1, "sort","n_tl1 desc");
+    
     handle.put("highlighting", UNORDERED);
     handle.put("response", UNORDERED);
 

{noformat}
               

> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Sebastian Nagel (Jira)
In reply to this post by Sebastian Nagel (Jira)

    [ 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] [Issue Comment Edited] (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.

Sebastian Nagel (Jira)
In reply to this post by Sebastian Nagel (Jira)

    [ 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: [hidden email]):
    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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Sebastian Nagel (Jira)
In reply to this post by Sebastian Nagel (Jira)

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

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

So I started looking at the following little bit of logic:
{noformat}
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)) {
{noformat}

This also needs a bit of tweaking to work with multiple fls. However, in trying to fix that, I realized this appears broken anyway. If you try and just ask for score back in distrib search, it fails. Not so to a single node.

It appears that "currently, "score" is synonymous with "*,score"" is just not true currently. If you ask a single node for fl=score, you only get back the score field. So later in distrib search when we look for the id field, we cannot find it and get an NPE.
               

> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Sebastian Nagel (Jira)
In reply to this post by Sebastian Nagel (Jira)

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

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

bq. It appears that "currently, "score" is synonymous with "*,score"" is just not true currently

This was recently changed by SOLR-2712 - this part of it just was missed.
               

> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] [Resolved] (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.

Sebastian Nagel (Jira)
In reply to this post by Sebastian Nagel (Jira)

     [ https://issues.apache.org/jira/browse/SOLR-3214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Miller resolved SOLR-3214.
-------------------------------

    Resolution: Fixed

Resolved using Tomas' patch in SOLR-3256
               

> 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: [hidden email]
For additional commands, e-mail: [hidden email]