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 6DFA1200CEF for ; Mon, 21 Aug 2017 03:43:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6BDAA163BB8; Mon, 21 Aug 2017 01:43:04 +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 B3299163BD8 for ; Mon, 21 Aug 2017 03:43:03 +0200 (CEST) Received: (qmail 46142 invoked by uid 500); 21 Aug 2017 01:43:02 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 45850 invoked by uid 99); 21 Aug 2017 01:43:02 -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; Mon, 21 Aug 2017 01:43:02 +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 DED991A04C9 for ; Mon, 21 Aug 2017 01:43:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id usuNPiUeThh7 for ; Mon, 21 Aug 2017 01:43:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id E09775FDBC for ; Mon, 21 Aug 2017 01:43:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7085DE0635 for ; Mon, 21 Aug 2017 01:43:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 24EFE2537E for ; Mon, 21 Aug 2017 01:43:00 +0000 (UTC) Date: Mon, 21 Aug 2017 01:43:00 +0000 (UTC) From: "jin jing (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: =?utf-8?Q?[jira]_[Updated]_(LUCENE-7931)_SpanNotQuery__has_bug=EF=BC=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 21 Aug 2017 01:43:04 -0000 [ https://issues.apache.org/jira/browse/LUCENE-7931?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:all-tabpanel ] jin jing updated LUCENE-7931: ----------------------------- Description:=20 i find when use SpanNotQuery and the exclud key word like "not" "or" wil= l give a error result example=EF=BC=9A doc1=EF=BC=9Athe quick brown fox jumps over the lazy dog doc2=EF=BC=9Athe quick red fox jumps over the sleepy cat doc3=EF=BC=9Athe quick brown fox jumps over the lazy NOT dog String queryStringStart =3D "dog"; =20 String queryStringEnd =3D "quick"; =20 String excludeString =3D "NOT"; =20 SpanQuery queryStart =3D new SpanTermQuery(new Term("text",queryStringStart= )); =20 SpanQuery queryEnd =3D new SpanTermQuery(new Term("text",queryStringEnd)); = =20 SpanQuery excludeQuery =3D new SpanTermQuery(new Term("text",excludeString)= ); =20 SpanQuery spanNearQuery =3D new SpanNearQuery( =20 new SpanQuery[] {queryStart,queryEnd}, 7, false, false); =20 =20 SpanNotQuery spanNotQuery =3D new SpanNotQuery(spanNearQuery, excludeQuery= , 4,3);=20 then this will return doc1 and doc3. so i think it is a bug.=20 was:i find when use SpanNotQuery and the exclud key word like "not" "or= " will give a error result > SpanNotQuery has bug=EF=BC=9F > ---------------------- > > Key: LUCENE-7931 > URL: https://issues.apache.org/jira/browse/LUCENE-7931 > Project: Lucene - Core > Issue Type: Bug > Components: core/search > Affects Versions: 5.3.1 > Reporter: jin jing > > i find when use SpanNotQuery and the exclud key word like "not" "or" w= ill give a error result > example=EF=BC=9A > doc1=EF=BC=9Athe quick brown fox jumps over the lazy dog > doc2=EF=BC=9Athe quick red fox jumps over the sleepy cat > doc3=EF=BC=9Athe quick brown fox jumps over the lazy NOT dog > String queryStringStart =3D "dog"; =20 > String queryStringEnd =3D "quick"; =20 > String excludeString =3D "NOT"; =20 > SpanQuery queryStart =3D new SpanTermQuery(new Term("text",queryStringSta= rt)); =20 > SpanQuery queryEnd =3D new SpanTermQuery(new Term("text",queryStringEnd))= ; =20 > SpanQuery excludeQuery =3D new SpanTermQuery(new Term("text",excludeStrin= g)); =20 > SpanQuery spanNearQuery =3D new SpanNearQuery( =20 > new SpanQuery[] {queryStart,queryEnd}, 7, false, false); =20 > =20 > SpanNotQuery spanNotQuery =3D new SpanNotQuery(spanNearQuery, excludeQue= ry, 4,3);=20 > then this will return doc1 and doc3. so i think it is a bug.=20 -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org