Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 93F4E9658 for ; Wed, 7 Mar 2012 13:53:56 +0000 (UTC) Received: (qmail 78775 invoked by uid 500); 7 Mar 2012 13:53:54 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 78488 invoked by uid 500); 7 Mar 2012 13:53: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 78468 invoked by uid 99); 7 Mar 2012 13:53:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2012 13:53:51 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 216.139.236.26 is neither permitted nor denied by domain of tropicano@gmail.com) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2012 13:53:46 +0000 Received: from ben.nabble.com ([192.168.236.152]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1S5HIz-0005gL-Jd for java-user@lucene.apache.org; Wed, 07 Mar 2012 05:53:25 -0800 Date: Wed, 7 Mar 2012 05:53:25 -0800 (PST) From: heikki To: java-user@lucene.apache.org Message-ID: <1331128405598-3806767.post@n3.nabble.com> Subject: How to construct this query ? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org hello, I'm trying to programmatically create a query but don't get it working. The query should return all results that match some prefix, but not any results that /exactly/ match the prefix (in the same field). So only the results where the field contents are longer than the prefix. I tried this: -FIELD:prefix +(FIELD:prefix*) but it doesn't work. Any help greatly appreciated, kind regards, Heikki Doeleman -- View this message in context: http://lucene.472066.n3.nabble.com/How-to-construct-this-query-tp3806767p3806767.html Sent from the Lucene - Java Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org