pz:limitmap:x local:field feature
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 16 Dec 2011 12:39:29 +0000 (13:39 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 16 Dec 2011 12:39:29 +0000 (13:39 +0100)
The local filter may optionally be followed by field.

src/client.c

index 7dc07d8..44d7f57 100644 (file)
@@ -1067,10 +1067,14 @@ const char *client_get_facet_limit_local(struct client *cl,
             if (p && !strcmp(p + 1, name) && s->value &&
                 !strncmp(s->value, "local:", 6))
             {
+                const char *cp = s->value + 6;
+                while (*cp == ' ')
+                    cp++;
+                    
                 nmem_strsplit_escape2(nmem, "|", value, values,
                                       num, 1, '\\', 1);
                 (*l)++;
-                return name;
+                return *cp ? cp : name;
             }
         }
     }