You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Erik Hatcher (JIRA)" <ji...@apache.org> on 2016/11/08 22:26:58 UTC
[jira] [Comment Edited] (SOLR-9740) Parameter substitution
(MacroExpander) Map expand issue
[ https://issues.apache.org/jira/browse/SOLR-9740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15648978#comment-15648978 ]
Erik Hatcher edited comment on SOLR-9740 at 11/8/16 10:26 PM:
--------------------------------------------------------------
this seems like a critical bug - we're seeing it eat fq's for real, when we're doing a {code}&fq=range_field:[${lower} TO ${upper}&fq=category:value{code} type of request.
was (Author: ehatcher):
this seems like a critical bug - we're seeing it eat fq's for real, when we're doing a `&fq=range_field:[${lower} TO ${upper}&fq=category:value` type of request.
> Parameter substitution (MacroExpander) Map expand issue
> -------------------------------------------------------
>
> Key: SOLR-9740
> URL: https://issues.apache.org/jira/browse/SOLR-9740
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Affects Versions: 6.0.1
> Reporter: Erik Hatcher
>
> {code}
> @Test
> public void testMap() {
> final Map<String,String[]> request = new HashMap<String,String[]>();
> request.put("fq", new String[] {"${one_ref}","two"});
> request.put("one_ref",new String[] {"one"});
> Map expanded = MacroExpander.expand(request);
> assertEquals("one", ((String[])expanded.get("fq"))[0]);
> assertEquals("two", ((String[]) expanded.get("fq"))[1]);
> }
> {code}
> fails with `java.lang.ArrayIndexOutOfBoundsException` because the resultant `expanded` structure only has a single "fq" value of "one". "two" got eaten.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org