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 B1A2F17739 for ; Tue, 14 Apr 2015 17:25:44 +0000 (UTC) Received: (qmail 53609 invoked by uid 500); 14 Apr 2015 17:25:42 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 53550 invoked by uid 500); 14 Apr 2015 17:25:42 -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 53538 invoked by uid 99); 14 Apr 2015 17:25:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Apr 2015 17:25:42 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of shay.hummel@gmail.com designates 209.85.223.172 as permitted sender) Received: from [209.85.223.172] (HELO mail-ie0-f172.google.com) (209.85.223.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Apr 2015 17:25:34 +0000 Received: by iedfl3 with SMTP id fl3so23371317ied.1 for ; Tue, 14 Apr 2015 10:24:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=WKc8GNRZMPI0hpegPb8Zz0BLdMEm8H4Yap0RpGEInpA=; b=vvYI+4uwBEWwM+byeNJ8teTa2d93aQBwLLeJw+nCqVPvo+ONrthsV2nYDAThXgbVu9 YS1fOu5DwhSGaZPDW2lbaK1SnLqxi4ZCnOpOaJ3kO7RXKi4eFOmcBL0qmLMtjzvrw6LG oBlcqw0xA3DrCV+ad17pU5AqAA7dCTKbRk1VHefalQVx9LGwQsOQGcp3kGXVsslnibI7 DqM4dyOPtoX8Vg8CiWEVzYZ1I5n+ypbHbRxYTqyRllMf0sbQxRRPxZKzoGc5xACgWFlB p56OWxAKlXUkHaV9uEup7HZAGml+rmpEJXH6TaHq8zgeDR6ET7qTiuNLlmXX+P6yU/QQ E0vg== X-Received: by 10.107.138.130 with SMTP id c2mr30075379ioj.74.1429032279715; Tue, 14 Apr 2015 10:24:39 -0700 (PDT) MIME-Version: 1.0 From: Shay Hummel Date: Tue, 14 Apr 2015 17:24:39 +0000 Message-ID: Subject: Span near query with payloads To: "java-user@lucene.apache.org" Content-Type: multipart/alternative; boundary=001a113f284e67b5e70513b28196 X-Virus-Checked: Checked by ClamAV on apache.org --001a113f284e67b5e70513b28196 Content-Type: text/plain; charset=UTF-8 Hi Why did you add this note in SpanPayloadCheckQuery "Do not use this with an SpanQuery that contains a SpanNearQuery . Instead, use SpanNearPayloadCheckQuery since it properly handles the fact that payloads aren't ordered by SpanNearQuery ." ? I used SpanNearQuery and provided, as its clauses[], an array of SpanPayloadCheckQuery and it seems to work OK? What I am trying to do is search terms in a certain window which each term has its own payload. I use the payload to code part of speech. for example: Doc1: I booked a flight. (booked is a verb, flight is a noun) Doc2: I read the book the Hobbit during the flight to London. (book is a noun, flight is a noun) when I searched "book flight" with (verb and noun as payload respectively) it worked for the correct window (depends If i removed stopwords or not) properly. So what did you mean with this note? Thank you, Shay Hummel --001a113f284e67b5e70513b28196--