Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DD282DD25 for ; Tue, 5 Mar 2013 14:15:59 +0000 (UTC) Received: (qmail 40671 invoked by uid 500); 5 Mar 2013 14:15:56 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 40481 invoked by uid 500); 5 Mar 2013 14:15:56 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 40451 invoked by uid 99); 5 Mar 2013 14:15:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Mar 2013 14:15:55 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of giorgi.jvaridze@gmail.com designates 209.85.215.176 as permitted sender) Received: from [209.85.215.176] (HELO mail-ea0-f176.google.com) (209.85.215.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Mar 2013 14:15:48 +0000 Received: by mail-ea0-f176.google.com with SMTP id a13so1188873eaa.21 for ; Tue, 05 Mar 2013 06:15:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:from:date:message-id:subject:to :content-type; bh=MDr7kZxu2yPM+55ckek56C1B5NmptBjJ/X2hcfmIsL4=; b=0F0r6JP259ApH577yqoEYi4bEJUnJ5iHmiDz7WuGeOwevEahkUmm9wuzTekh3Su1PL R+G8D0J99Q75Gt61qg3OmWJBRokrioQjhqkFDVs711gdu9rjBCByelc1XoKmMPGa1SaH KanPXvlq3pbtL1vRoCU+QaLv7hoIOAfKvk6U1FuXbYVsaGA/Kb13RfFsMdofsNaumTkP wvHBJ7UZxj0PCELEUUAeD9wfeA3wBFmRGhFtIlIpQXuhZPSNdOYoBdrk0izIp6kcAFxd RYQvlNzwxyRa0x/vjHWHMjEoNBAEdwVATTEJTo/fSLDq86eg9jHwzdmKiuKxuoAy4hwi ofkw== X-Received: by 10.14.207.73 with SMTP id m49mr71284545eeo.24.1362492928138; Tue, 05 Mar 2013 06:15:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.162.135 with HTTP; Tue, 5 Mar 2013 06:15:07 -0800 (PST) From: Giorgi Jvaridze Date: Tue, 5 Mar 2013 18:15:07 +0400 Message-ID: Subject: Tagging and Excluding Filters with date range facets To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=047d7b343a7cfdc56b04d72e1a9d X-Virus-Checked: Checked by ClamAV on apache.org --047d7b343a7cfdc56b04d72e1a9d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi all, I want to use date range facet and I want to allow user to select several facet values. So I added date range facet with 'ex' LocalParam .addDateRangeFacet("{!ex=3Dmotion_date}motion_date", start, end, "+1MONTH") But when I query it like this /select?q=3Dtarget_name%3Ablabla&rows=3D25&facet=3Dtrue&facet.mincount=3D1&= facet.limit=3D10&facet.range=3D%7B%21ex%3Dmotion_date%7Dmotion_date&f.{!ex= =3Dmotion_date}motion_date.facet.range.start=3D2010-02-01T14%3A00%3A13.016Z= &f.{!ex=3Dmotion_date}motion_date.facet.range.end=3D2014-02-01T14%3A00%3A13= .016Z&f.{!ex=3Dmotion_date}motion_date.facet.range.gap=3D%2B1MONTH&wt=3Djav= abin&version=3D2 solr throws exception org.apache.solr.client.solrj.SolrServerException: Error executing query at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java= :98) at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:301) Caused by: java.lang.IllegalArgumentException: Illegal character in query at index 160: http://solrserver:8983/solr/select?q=3Dtarget_name%3Ablabla&rows=3D25&facet= =3Dtrue&facet.mincount=3D1&facet.limit=3D10&facet.range=3D%7B%21ex%3Dmotion= _date%7Dmotion_date&f.{!ex=3Dmotion_date}motion_date.facet.range.start=3D20= 10-02-01T14%3A00%3A13.016Z&f.{!ex=3Dmotion_date}motion_date.facet.range.end= =3D2014-02-01T14%3A00%3A13.016Z&f.{!ex=3Dmotion_date}motion_date.facet.rang= e.gap=3D%2B1MONTH&wt=3Djavabin&version=3D2 at java.net.URI.create(URI.java:859) at org.apache.http.client.methods.HttpGet.(HttpGet.java:69) at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.jav= a:224) at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.jav= a:181) at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java= :90) ... 35 more Caused by: java.net.URISyntaxException: Illegal character in query at index 160: http://solrserver:8983/solr/select?q=3Dtarget_name%3Ablabla&rows=3D25&facet= =3Dtrue&facet.mincount=3D1&facet.limit=3D10&facet.range=3D%7B%21ex%3Dmotion= _date%7Dmotion_date&f.{!ex=3Dmotion_date}motion_date.facet.range.start=3D20= 10-02-01T14%3A00%3A13.016Z&f.{!ex=3Dmotion_date}motion_date.facet.range.end= =3D2014-02-01T14%3A00%3A13.016Z&f.{!ex=3Dmotion_date}motion_date.facet.rang= e.gap=3D%2B1MONTH&wt=3Djavabin&version=3D2 at java.net.URI$Parser.fail(URI.java:2829) at java.net.URI$Parser.checkChars(URI.java:3002) at java.net.URI$Parser.parseHierarchical(URI.java:3092) at java.net.URI$Parser.parse(URI.java:3034) at java.net.URI.(URI.java:595) at java.net.URI.create(URI.java:857) ... 39 more I think it's because of addDateRangeFacet method instead of adding query parameter this way: f.{!ex=3Dmotion_date}motion_date.facet.range.start. it should remove LocalParam and add to query param like f.motion_date.facet.range.start Can you confirm this behavior as Bug? Thanks, Giorgi --047d7b343a7cfdc56b04d72e1a9d--