Return-Path: X-Original-To: apmail-lucenenet-user-archive@www.apache.org Delivered-To: apmail-lucenenet-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 EA8C5EEE4 for ; Sun, 17 Feb 2013 16:04:39 +0000 (UTC) Received: (qmail 90111 invoked by uid 500); 17 Feb 2013 16:04:39 -0000 Delivered-To: apmail-lucenenet-user-archive@lucenenet.apache.org Received: (qmail 90064 invoked by uid 500); 17 Feb 2013 16:04:38 -0000 Mailing-List: contact user-help@lucenenet.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@lucenenet.apache.org Delivered-To: mailing list user@lucenenet.apache.org Received: (qmail 90042 invoked by uid 99); 17 Feb 2013 16:04:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Feb 2013 16:04:37 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.210.173] (HELO mail-ia0-f173.google.com) (209.85.210.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Feb 2013 16:04:31 +0000 Received: by mail-ia0-f173.google.com with SMTP id h37so4605063iak.18 for ; Sun, 17 Feb 2013 08:04:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:from:date:x-google-sender-auth :message-id:subject:to:content-type:x-gm-message-state; bh=+uZgTrXvr1cO33FTaSN7wXD/gs3OCAc/X26tWdbmj3U=; b=X6RaPcVFE7r5TZHYgECWKLHtbZct4qOjD4Ni3oovDLRYHFcpByr8KEUQLmT0IhcNFn mPUFgFt6idLjm0i/1XMiriFXEkvd5oLYCpKUvGLMkMuVyAG1MLNoL8S6kVZ5rUD+YVo1 Xp5XElh4cw+STXxRK4exlxDMNlibGJQ+VfEzUfckhiDwJNsr5RTjZRgrX1aW/i8YiKp0 ZzxyTfO0gOjC9pmFOloilsnLEYelVLUCCOfBX61ukgdnqw5Xx+yLek6UZllVnHp20xl3 ihnfiNNYwK4S83wrYtlHmqf129IV0ao253HerB1wjIXCiQ+VR9IaOwB8PQpAYIaPuxvE vflQ== X-Received: by 10.50.42.129 with SMTP id o1mr778851igl.32.1361117049308; Sun, 17 Feb 2013 08:04:09 -0800 (PST) MIME-Version: 1.0 Sender: omri@diffdoof.com Received: by 10.64.24.197 with HTTP; Sun, 17 Feb 2013 08:03:49 -0800 (PST) From: Omri Suissa Date: Sun, 17 Feb 2013 18:03:49 +0200 X-Google-Sender-Auth: cEsmZWj1kblQVeVMrmyXYp_oi0w Message-ID: Subject: Extending QueryParser to properly handle numeric fields To: user@lucenenet.apache.org Content-Type: multipart/alternative; boundary=14dae9340a2d38c41a04d5edc2d3 X-Gm-Message-State: ALoCoQm7M9fzDuiBxbKhEWnbPHrQIRLbn7w15HTXGF6lJy2hnap2yNZ6DyIIxyveVOL6tXac0hqh X-Virus-Checked: Checked by ClamAV on apache.org --14dae9340a2d38c41a04d5edc2d3 Content-Type: text/plain; charset=ISO-8859-1 Hi, I want to extend QueryParser to properly handle numeric fields. I found a lot of info about it on the java mailing list. One of the resolutions to this problem looks very good: override GetRangeQuery and create NumericRangeQuery. But, here is my problem, in all examples the code is looks like this: int num1 = Integer.parseInt(part1); int num2 = Integer.parseInt(part2); Query q = NumericRangeQuery.newIntRange(field, num1, num2, inclusive, inclusive); where part1 and part2 are the 2 parts of the range. when i search for "price:[1 TO 10]" i get in part1: "price:[1" and in part2: "price:[1 TO 10]". why is that? there is a difference between the Java version and the .net version of the QueryParser? or this is a bug in the .net version? Thanks, Omri --14dae9340a2d38c41a04d5edc2d3--