Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9478A200AE2 for ; Fri, 13 May 2016 00:48:52 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 92E9A160A10; Thu, 12 May 2016 22:48:52 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D9CD1160939 for ; Fri, 13 May 2016 00:48:51 +0200 (CEST) Received: (qmail 60960 invoked by uid 500); 12 May 2016 22:48:50 -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 60948 invoked by uid 99); 12 May 2016 22:48:50 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 May 2016 22:48:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id D5E581A0101 for ; Thu, 12 May 2016 22:48:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.38 X-Spam-Level: ** X-Spam-Status: No, score=2.38 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, KAM_COUK=1.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=flax-co-uk.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id GYThc3W1N9ds for ; Thu, 12 May 2016 22:48:47 +0000 (UTC) Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 292DE5F2F0 for ; Thu, 12 May 2016 22:48:47 +0000 (UTC) Received: by mail-wm0-f46.google.com with SMTP id a17so2057782wme.0 for ; Thu, 12 May 2016 15:48:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flax-co-uk.20150623.gappssmtp.com; s=20150623; h=from:mime-version:subject:date:in-reply-to:to:references:message-id; bh=Phi68Ami84aF6TwAD/3BmCrpU+fshIovNRHvKQU/KLU=; b=vTQLqF0mD0R8K+OmM7jVvCVfuCplnN0VgmiJIEvrwMnMr4h5+R0qp4SriA9Zctt9Qg SJ64PRNV9F1vgLY682nt/nl1uVrFsFns33XhoR82YQJcuFS5sLpWsewpUXwgWw1kGfn4 X/7yvbCzunpocrFoXyZaqH+1OFX5bmH1BhbyFZcK6yPFpRO8nCCu0Is1l73XMGeLXqQX byP9yEZy/lAjJdJz8h02pNl60sypsSdVkTkYhFnMQOW7ReO3Jg2Vaz0COrAe1ifpBucK flkXvn/d3bu/WwR3/GH7s+Y4qrDwhoE0bPzncGZddM3cxDHIuXPqc/A8CV1fhda3pXq2 olzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:subject:date:in-reply-to:to :references:message-id; bh=Phi68Ami84aF6TwAD/3BmCrpU+fshIovNRHvKQU/KLU=; b=C/pwcDjvcAc0XSXJPu2q4aGgcA1x5K9oFnYFTZIllU+9O5HNAt0jQiBIorhh888wg5 3OMZvGuZZpN0Lcre+D89m0CAwrCSCRvhXLcy5BMwj0BKcCBMxSDMX1ztE8ijyYGzfD00 0kbkCDxlML6eXPhnbL+AAAVQldQGeqQ5YT8Rl1Y9SczlSCAuABFd3fH9oU2fPlOTlmoZ Ouvw7/fgUYdz/E9tgqKpEsHiW5GuPsLb7visHJ6QAi6BU4BVgEx1TuidGJxLhvxwhxjK gURVumJievpVXKyT8Ug7C5PLfvJF5H7Og9ab+D476e0+YblWeU0lRO9IC5eFNQd1FLNE 0ctA== X-Gm-Message-State: AOPr4FUOlpmMLSucPvpJ9MKt1L34L7hPPg8ifsAy3A99K8ZgxoWenXDtOpEpBaYlUEptfQ== X-Received: by 10.28.139.75 with SMTP id n72mr186376wmd.28.1463093326779; Thu, 12 May 2016 15:48:46 -0700 (PDT) Received: from [192.168.0.4] (88-109-164-30.dynamic.dsl.as9105.com. [88.109.164.30]) by smtp.gmail.com with ESMTPSA id q125sm194764wmd.19.2016.05.12.15.48.45 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 May 2016 15:48:45 -0700 (PDT) From: Alan Woodward Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: multipart/alternative; boundary="Apple-Mail=_E7082418-6AAA-49E0-A1B6-931FBCBDD14B" Subject: Re: SpanNearQuery, Multiple Fields Date: Thu, 12 May 2016 23:48:44 +0100 In-Reply-To: <5734DB03.6070203@wolfram.com> To: java-user@lucene.apache.org References: <5734DB03.6070203@wolfram.com> Message-Id: X-Mailer: Apple Mail (2.1283) archived-at: Thu, 12 May 2016 22:48:52 -0000 --Apple-Mail=_E7082418-6AAA-49E0-A1B6-931FBCBDD14B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Try adding your multiple SpanNearQuery objects to a BooleanQuery? Alan Woodward www.flax.co.uk On 12 May 2016, at 20:35, Daniel Bigham wrote: > I'm very interested in SpanNearQuery, because it allows for quite = powerful phrasal searching. >=20 > However, unlike BooleanQuery, there doesn't seem to be any way to have = it search multiple fields. >=20 > I thought I might be able to wrap multiple SpanNearQueries, each of = them searching a different field, in an outer SpanOrQuery, but that = raises an exception: >=20 > java.lang.IllegalArgumentException: Clauses must have same field. > at = org.apache.lucene.search.spans.SpanOrQuery.addClause(SpanOrQuery.java:63) >=20 > So, is there any way to do what I'd like to do? Would it require = performing multiple search operations, once per field, and then = combining the results from those multiple queries? >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org >=20 --Apple-Mail=_E7082418-6AAA-49E0-A1B6-931FBCBDD14B--