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 D8A629813 for ; Fri, 27 Jan 2012 20:18:05 +0000 (UTC) Received: (qmail 88038 invoked by uid 500); 27 Jan 2012 20:18:02 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 87982 invoked by uid 500); 27 Jan 2012 20:18:01 -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 87974 invoked by uid 99); 27 Jan 2012 20:18:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jan 2012 20:18:01 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW X-Spam-Check-By: apache.org Received-SPF: unknown (nike.apache.org: error in processing during lookup of Dipti.Srivastava@apollogrp.edu) Received: from [213.199.154.206] (HELO AM1EHSOBE003.bigfish.com) (213.199.154.206) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jan 2012 20:17:53 +0000 Received: from mail60-am1-R.bigfish.com (10.3.201.243) by AM1EHSOBE003.bigfish.com (10.3.204.23) with Microsoft SMTP Server id 14.1.225.23; Fri, 27 Jan 2012 20:17:31 +0000 Received: from mail60-am1 (localhost [127.0.0.1]) by mail60-am1-R.bigfish.com (Postfix) with ESMTP id 720B340463 for ; Fri, 27 Jan 2012 20:17:31 +0000 (UTC) X-SpamScore: -28 X-BigFish: VPS-28(zzbb2dI9371I936eK103dK1432N98dK14ffO4015Lzz1202hzz8275dhz2fhc1bhc31hc1ah668h839h944h) X-Forefront-Antispam-Report: CIP:204.17.31.150;KIP:(null);UIP:(null);IPV:NLI;H:paaxiron001.apollogrp.edu;RD:ironport-out.apollogrp.edu;EFVD:NLI Received-SPF: pass (mail60-am1: domain of apollogrp.edu designates 204.17.31.150 as permitted sender) client-ip=204.17.31.150; envelope-from=Dipti.Srivastava@apollogrp.edu; helo=paaxiron001.apollogrp.edu ;pollogrp.edu ; Received: from mail60-am1 (localhost.localdomain [127.0.0.1]) by mail60-am1 (MessageSwitch) id 1327695448221196_5429; Fri, 27 Jan 2012 20:17:28 +0000 (UTC) Received: from AM1EHSMHS010.bigfish.com (unknown [10.3.201.254]) by mail60-am1.bigfish.com (Postfix) with ESMTP id 31DFC460045 for ; Fri, 27 Jan 2012 20:17:28 +0000 (UTC) Received: from paaxiron001.apollogrp.edu (204.17.31.150) by AM1EHSMHS010.bigfish.com (10.3.207.110) with Microsoft SMTP Server id 14.1.225.23; Fri, 27 Jan 2012 20:17:27 +0000 Received: from pwadexht003.apollogrp.edu ([10.29.144.107]) by paaxiron001.apollogrp.edu with ESMTP; 27 Jan 2012 13:17:26 -0700 Received: from PWADEXRF001.apollogrp.edu (10.29.144.109) by pwadexht003.apollogrp.edu (10.29.144.107) with Microsoft SMTP Server (TLS) id 8.3.159.2; Fri, 27 Jan 2012 13:17:26 -0700 Received: from EXCH07-04.apollogrp.edu ([10.29.144.117]) by PWADEXRF001.apollogrp.edu ([10.29.144.109]) with mapi; Fri, 27 Jan 2012 13:17:26 -0700 From: Dipti Srivastava To: "solr-user@lucene.apache.org" Date: Fri, 27 Jan 2012 13:18:45 -0700 Subject: Re: Validating solr user query Thread-Topic: Validating solr user query Thread-Index: AczdMK/kKSigmKcaSQarytS6VLghZA== Message-ID: In-Reply-To: <1327318392.2095.10.camel@snape> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.14.0.111121 acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: apollogrp.edu X-Virus-Checked: Checked by ClamAV on apache.org Hi Chantal, Thanks for your response. Isn't the DisMaxQParserPlugin the default parser, when none is specified? I am using Solr version 3.4. Thanks, Dipti On 1/23/12 3:33 AM, "Chantal Ackermann" wrote: >Hi Dipti, > >just to make sure: are you aware of > >http://wiki.apache.org/solr/DisMaxQParserPlugin > >This will handle the user input in a very conventional and user friendly >way. You just have to specify on which fields you want it to search. >With the 'mm' parameter you have a powerfull option to specify how much >of a search query has to match (more flexible than defining a default >operator). > >Cheers, >Chantal > >On Fri, 2012-01-20 at 23:52 +0100, Dipti Srivastava wrote: >> Hi All, >> I ma using HTTP/JSON to search my documents in Solr. Now the client >>provides the query on which the search is based. >> What is a good way to validate the query string provided by the user. >> >> On the other hand, if I want the user to build this query using some >>Solr api instead of preparing a lucene query string which API can I use >>for this? >> I looked into >> SolrQuery in SolrJ but it does not appear to have a way to specify the >>more complex queries with the boolean operators and operators such as >>~,+,- etc. >> >> Basically, I am trying to avoid running into bad query strings built by >>the caller. >> >> Thanks! >> Dipti >> >> ________________________________ >> This message is private and confidential. If you have received it in >>error, please notify the sender and remove it from your system. >> > > This message is private and confidential. If you have received it in error,= please notify the sender and remove it from your system.