Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 40913 invoked from network); 23 Dec 2010 22:51:56 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Dec 2010 22:51:56 -0000 Received: (qmail 32918 invoked by uid 500); 23 Dec 2010 22:51:54 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 32875 invoked by uid 500); 23 Dec 2010 22:51:54 -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 32867 invoked by uid 99); 23 Dec 2010 22:51:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Dec 2010 22:51:54 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of erickerickson@gmail.com designates 209.85.216.169 as permitted sender) Received: from [209.85.216.169] (HELO mail-qy0-f169.google.com) (209.85.216.169) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Dec 2010 22:51:47 +0000 Received: by qyk7 with SMTP id 7so7489079qyk.14 for ; Thu, 23 Dec 2010 14:51:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=O6yDPc60p/YA1piCg4e1pnuuBraxoVGP/m2fK1CNfcE=; b=lthhQ5WiUyX0pM2IMrxCVuKaREyIMozJle4k7ND+RsbisP6VV2Ji5wJ8UDej8xwYjP Iwr2+qp22kQ19wdrRHnsGJKvuQFOYCNjUm/S40+m5ROJF/CwHud5POkUwGZ8lGwRsjcN 2DI3j7b7Ob8WSDv3m6+MxIaSGvTm1rIYnNq5k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=toD/1YzxHuqPVNbIWwgyt7VQkrs8v6TaBi9kbsDFgd7sFHkiAAVftsdzdOVfqnErqj CWkDqWLzlSNb4CnJx8kUhDX5ikneQmJ3l87xMv52YnfLd/i6mg3A9sRrdP8aZXivVvJU m/SxFeFI+qmZDmIEGMAFylD0TWiMFbHDbm3Tk= MIME-Version: 1.0 Received: by 10.229.186.141 with SMTP id cs13mr7524144qcb.283.1293144687121; Thu, 23 Dec 2010 14:51:27 -0800 (PST) Received: by 10.229.235.208 with HTTP; Thu, 23 Dec 2010 14:51:27 -0800 (PST) In-Reply-To: <1A297333-56F0-4485-BD74-8E3DC96AE39E@go2.com> References: <1A297333-56F0-4485-BD74-8E3DC96AE39E@go2.com> Date: Thu, 23 Dec 2010 17:51:27 -0500 Message-ID: Subject: Re: Get Analyzed/Tokenized Field List From: Erick Erickson To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=0016362848bcb814e904981bb5ec X-Virus-Checked: Checked by ClamAV on apache.org --0016362848bcb814e904981bb5ec Content-Type: text/plain; charset=ISO-8859-1 Ah, you didn't mention indexed but unstored in your original message, just indexed/analyzed.... I don't think you can (someone jump in here if I'm wrong, please). The problem is that Lucene doesn't require any sort of schema. So if you are perfectly free to store a field in one document and NOT store it in another. All the variants specified in IndexReader.fieldOption can quickly be determined by just looking at the various index files. But you'd have to spin through all the #documents# in order to answer the question "is this field ever stored?". Sounds like a table scan in the DB world. I don't think Lucene keeps meta-data for this, and spinning through all the documents would be expensive... Why do you want to know? Perhaps there's another way to satisfy the use-case. I could be way off base here, I'm speaking from general principles not knowledge of the code... Best Erick On Thu, Dec 23, 2010 at 4:43 PM, Jordon Saardchit wrote: > Yes I have, and after testing each of the various options denoted in > IndexReader.FieldOption, I cannot retrieve fieldnames that are indexed > (analyzed), and unstored. I figured this would be relatively easy to do and > I was simply overlooking something. Is it perhaps not possible to do this? > > Jordon > > On Dec 23, 2010, at 1:30 PM, Erick Erickson wrote: > > > Have you looked at IndexReader.getFieldNames()? > > > > Best > > Erick > > > > On Thu, Dec 23, 2010 at 3:23 PM, Jordon Saardchit >wrote: > > > >> Is there an easy way to retrieve a collection of fields (or field names) > >> that are analyzed/tokenized from any given index? > >> > >> Jordon > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > >> For additional commands, e-mail: java-user-help@lucene.apache.org > >> > >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > --0016362848bcb814e904981bb5ec--