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 3DF70EBA7 for ; Thu, 24 Jan 2013 10:55:37 +0000 (UTC) Received: (qmail 12840 invoked by uid 500); 24 Jan 2013 10:55:35 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 12733 invoked by uid 500); 24 Jan 2013 10:55:34 -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 12684 invoked by uid 99); 24 Jan 2013 10:55:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jan 2013 10:55:32 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of belunto@googlemail.com designates 209.85.216.46 as permitted sender) Received: from [209.85.216.46] (HELO mail-qa0-f46.google.com) (209.85.216.46) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jan 2013 10:55:28 +0000 Received: by mail-qa0-f46.google.com with SMTP id r4so241911qaq.19 for ; Thu, 24 Jan 2013 02:55:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type:content-transfer-encoding; bh=zFv8JuywDRXA4d6xdgYWMP3v9MevdaEeGIz1vIvTAac=; b=r8uKaE5p9IJIIwgdvOK6tTmINB4jZEeDYQ/6hXkHPR63xZsh+d4bZJjC6AkiGZN6Ii l120REVAhM6IORxsAs37LKV/9c+d8LiU2RyVSAa4KPlzXJhrKmx06i/mn5bhcwSnJ1Nh AEaEBPxwp6Vn27J4IrcDCnXGFXuhinwQUpU6Vv/BiCp0HTsHdPIbfoyifp7B5DAcgKEL GLfN2LY1fDgSkFBkzMZMWt4glfzJSsGSIwMuawNYYFXjLgtyVRzNX+UAXE2+k5+CWTha 8x+aZd9pBXwXradD7aSg0HGwY/C1mc011W4HdhGx5tHT7QtFG3upkyC+U1MGc9tuyhL1 OYPA== MIME-Version: 1.0 X-Received: by 10.229.177.142 with SMTP id bi14mr371570qcb.48.1359024907324; Thu, 24 Jan 2013 02:55:07 -0800 (PST) Received: by 10.49.11.228 with HTTP; Thu, 24 Jan 2013 02:55:07 -0800 (PST) In-Reply-To: References: Date: Thu, 24 Jan 2013 11:55:07 +0100 Message-ID: Subject: Re: StoredFieldsFormat / documentation From: =?UTF-8?Q?Bernd_M=C3=BCller?= To: java-user@lucene.apache.org, simon.willnauer@gmail.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi Simon, > you mean where it is used? Look at the org.apache.lucene.codecs.Codec > class, it has a method: > > public abstract StoredFieldsFormat storedFieldsFormat(); > > which returns a stored fields format used to encode your stored fields > written by the index writer. Thanks for your quick reply. So I have to change the return value of the method storedFieldsFormat to a custom CompressingStoredFieldsFormat. Then, I set the codec in the IndexWriterConfig for the IndexWriter. If this is correct, my problem is solved. Next question that comes up: If I have different IndexWriters writing in the same index with different codecs, is the codec for the fields somehow resolved for an IndexReader? Or does every instance of an IndexWriter change the stored fields to its codec when committing and closing the index? Regards, Bernd 2013/1/24 Simon Willnauer : > Hi Bernd, > > > On Thu, Jan 24, 2013 at 9:30 AM, Bernd M=C3=BCller wrote: >> Hello, >> >> In the lucene 4.1 release, there was introduced a compression for >> stored fields as described here: >> https://issues.apache.org/jira/browse/LUCENE-4226 > > yeah that is correct, its the new default. if you use Lucene 4.1 this > will be enabled and used by default for all stored fields. > there is also a blog post about the stored fields format > http://blog.jpountz.net/post/33247161884/efficient-compressed-stored-fiel= ds-with-lucene >> >> In the java-docs, I don't really find any documentation about the >> application of StoredFieldsFormat and CompressingStoredFieldsFormat. > > you mean where it is used? Look at the org.apache.lucene.codecs.Codec > class, it has a method: > > public abstract StoredFieldsFormat storedFieldsFormat(); > > which returns a stored fields format used to encode your stored fields > written by the index writer. >> >> Where can I apply the field compression and provide parameters for the >> compression level? > > Look at Lucene41Codec this is where the field format is created. you > can use your own codec (subclass codec) and plug it into the > IndexWriterConfig > to apply your own settings. >> >> The documentation about the 4.0 and 4.1 releases with examples about >> the changes aren't well documented. The wiki seems a little bit >> outdated. For lucene 2 and 3, I have read the Manning-Series Lucene in >> Action that doesn't have any successor so far for the lucene 4 >> release. >> >> Does there exist any further documentation, especially with examples >> for the new releases? > > I don't think we have examples on the wiki for that stuff but we should I= guess. > > simon >> >> Regards, >> >> Bernd >> >> --------------------------------------------------------------------- >> 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 > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org