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 1A17E9C76 for ; Tue, 7 Feb 2012 09:12:58 +0000 (UTC) Received: (qmail 28619 invoked by uid 500); 7 Feb 2012 09:12:55 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 28150 invoked by uid 500); 7 Feb 2012 09:12: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 28142 invoked by uid 99); 7 Feb 2012 09:12:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 09:12:38 +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 tommaso.teofili@gmail.com designates 209.85.210.48 as permitted sender) Received: from [209.85.210.48] (HELO mail-pz0-f48.google.com) (209.85.210.48) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 09:12:32 +0000 Received: by dadp13 with SMTP id p13so6842666dad.35 for ; Tue, 07 Feb 2012 01:12:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=gwuo7epgJH7LS6m3OF6eruC0LNlfBc1aMEcrg36WkuA=; b=RICd2xVtK7AziEbN6pxYWYbNBwmWLNh5DVGRJs17ImCPf3yB6R6owLF8wZLDGeXTCw vIdEzLDV8BdRUlg3fe/Pb6VAefK6EPo4WeuuVdIylQTZwUBk8OodNegT7hjNcwFmV2tR bOXQEI05Sx2KGcF12u0Au58Jy4A1/XkqWZnY4= Received: by 10.68.234.138 with SMTP id ue10mr55952849pbc.48.1328605932390; Tue, 07 Feb 2012 01:12:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.143.138.17 with HTTP; Tue, 7 Feb 2012 01:11:26 -0800 (PST) In-Reply-To: References: From: Tommaso Teofili Date: Tue, 7 Feb 2012 10:11:26 +0100 Message-ID: Subject: Re: Custom Payload Analyzer and Query To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=047d7b33cfa4a58aa404b85c2c37 --047d7b33cfa4a58aa404b85c2c37 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 2012/2/6 Ian Lea > Not sure if you got an answer to this or not. Don't recall seeing one > and gmail threading says not. > > > Is the use of payloads I've described appropriate? > > Sounds OK to me, although I'm not sure why you can't store the > metadata as a Document Field. > > > Can I exclude/filter the matching terms based on the payload within a > query itself ? > > I think not. Could if the metadata was an indexed Field. > What you may do is initially put your metadata inside the token type, then use the TypeTokenFilter to filter out some of them then "copy=93 them insid= e the payloads using TypeAsPayloadTokenFilter and search with PayloadSpanUtil/PayloadTermQuery/etc. HTH, Tommaso > > > > -- > Ian. > > > On Mon, Jan 30, 2012 at 10:24 PM, wrote: > > I'm working on providing advanced searching for annotated Medical > > Documents (using UIMA). In the context of an annotated document, I > > identify relevant medical terms, as well as the negation of certain > terms. > > Following what I've read and seen in Lucene examples, I've been able t= o > > provide a search that takes into account the metadata contained in the > > payload. Although very primitive, I've implemented a search which > returns > > the payloads (using PayloadSpanUtil), and then excludes those terms whe= re > > the payload doesn't meet the criteria. > > > > Is the use of payloads I've described appropriate? Can I exclude/filte= r > > the matching terms based on the payload within a query itself ? Are > > there any examples that do this? > > > > Cheers, > > Kyley > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > --047d7b33cfa4a58aa404b85c2c37--