Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 10912 invoked from network); 12 Oct 2007 08:15:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Oct 2007 08:15:09 -0000 Received: (qmail 64510 invoked by uid 500); 12 Oct 2007 08:14:51 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 64485 invoked by uid 500); 12 Oct 2007 08:14:51 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 64474 invoked by uid 99); 12 Oct 2007 08:14:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2007 01:14:51 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [213.39.232.201] (HELO moskovskaya.fh-wedel.de) (213.39.232.201) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2007 08:14:52 +0000 Received: from di by moskovskaya.fh-wedel.de with local (Exim 4.50) id 1IgFfC-0002CT-QK for java-user@lucene.apache.org; Fri, 12 Oct 2007 10:14:30 +0200 Date: Fri, 12 Oct 2007 10:14:30 +0200 From: Martin Dietze To: Lucene Users Subject: Re: Weird operator precedence with default operator AND Message-ID: <20071012081430.GA7671@fh-wedel.de> Reply-To: Martin Dietze Mail-Followup-To: Lucene Users References: <20071009075547.GA27648@fh-wedel.de> <470CBF83.7060608@gmail.com> <20071010122652.GA31418@fh-wedel.de> <20071010144038.GA1320@fh-wedel.de> <470D099F.3010802@gmail.com> <20071011080924.GC17538@fh-wedel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) Sender: Martin Dietze X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: di@mail.fh-wedel.de X-Virus-Checked: Checked by ClamAV on apache.org Chris, On Thu, October 11, 2007, Chris Hostetter wrote: > ... are you talking about preventing people from including field > specific queries in their query string? i'm guessing that you mean > something like this is okay... > > solr title:bobby body:boy > > ...but this isn't... > > solr title:bobby body:boy secret_field:xyzyq > > ...is that the idea? yes that's just about it. We have two search engines for different purposes. The first one indexes more fields than the second and we want to prevent "good" search queries from failing on the second. Supporting all theses fields on the second SE is not a good idea since indexing all this additonal data would have an impact on performance and index size. > the easiest approach is to do your own simple pass over the query string, > and escape any metacharacters in clauses you don't like ... they'll be > treated as "terms" and either be ignored (if they are optional) or cause > the query to not match anything (if they are required)... This is a very interesting idea. Yet I wonder how to deal with such terms if they are part of an AND query (actually AND is our default operator, so that a query "body:boy secret_field\:xyzyq" would always fail. It seems obvious that in any case you end up parsing the query in some way... Cheers, Martin -- ----------- / http://herbert.the-little-red-haired-girl.org / ------------- =+= My family says I'm a psychopath, but the voices in my head disagree --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org