Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 919D57C92 for ; Fri, 21 Oct 2011 01:11:41 +0000 (UTC) Received: (qmail 36419 invoked by uid 500); 21 Oct 2011 01:11:40 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 36364 invoked by uid 500); 21 Oct 2011 01:11:40 -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 36357 invoked by uid 99); 21 Oct 2011 01:11:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Oct 2011 01:11:40 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.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 (athena.apache.org: domain of aduric@gmail.com designates 209.85.216.48 as permitted sender) Received: from [209.85.216.48] (HELO mail-qw0-f48.google.com) (209.85.216.48) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Oct 2011 01:11:36 +0000 Received: by qadb14 with SMTP id b14so3925409qad.35 for ; Thu, 20 Oct 2011 18:11:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=KlDXMoNgW3ZUN/9t4P5TbEvCSEIFxUulLQKPhOtsP9g=; b=LkVvwbZ79bJvLzDGrWG5FQz0dDie0nTIohCuT6TgIWfHs41Ui8tfj0QuM8M+MsRqaW t68OBc7vByjJmgIyg9dvnVLSK6hUe5GDjG9ZbddTQoRsRehMw7/PTNxk06OVoQVzsxud sXzcLNkWU8mSF7MszfTWhxhI7m9lEa2hKWh34= MIME-Version: 1.0 Received: by 10.224.32.5 with SMTP id a5mr10603833qad.69.1319159475445; Thu, 20 Oct 2011 18:11:15 -0700 (PDT) Received: by 10.224.80.195 with HTTP; Thu, 20 Oct 2011 18:11:15 -0700 (PDT) In-Reply-To: References: Date: Thu, 20 Oct 2011 21:11:15 -0400 Message-ID: Subject: Re: FieldType refactoring? From: Adnan Duric To: dev@lucene.apache.org Content-Type: multipart/alternative; boundary=20cf3074da56ef9ee004afc4bf75 --20cf3074da56ef9ee004afc4bf75 Content-Type: text/plain; charset=ISO-8859-1 That could work, but what happens when the user doesn't want indexing, ie, indexed = false? I guess the IndexOptions argument could be ignored if no indexing is taking place, but then we are forcing the user to enter a dummy parameter. On Thu, Oct 20, 2011 at 8:52 PM, Chris Male wrote: > I really favour sticking to the existing enum and don't think we should > unravel them into int flags for the reasons already put forward. > > Having thought about my original concern, I think its best we don't make it > an optional argument, we should force users to specify what IndexOptions > they want explicitly. > > On Fri, Oct 21, 2011 at 1:42 PM, Adnan Duric wrote: > >> We can pass an enum member individually (DOCS_ONLY, DOCS_AND_FREQS...) to >> the ctor to prevent inconsistencies. This way we would have the same number >> of extra arguments as splitting them, and no complex pair checking between >> them. >> >> >> On Thu, Oct 20, 2011 at 6:40 PM, Simon Willnauer < >> simon.willnauer@googlemail.com> wrote: >> >>> On Thu, Oct 20, 2011 at 10:35 PM, Robert Muir wrote: >>> > On Thu, Oct 20, 2011 at 8:16 PM, Michael McCandless >>> > wrote: >>> > >>> >> We'd need checking in FT's ctor to catch wrong pairings, eg you cannot >>> >> turn ont POSITIONS unless you also turn on FREQS, and at least DOCS >>> >> must be set if INDEXED is set. >>> >> >>> > >>> > What is the problem with the enum? it prevents these inconsistencies... >>> +1 to stick to enums here! >>> >>> > >>> > >>> > -- >>> > lucidimagination.com >>> > >>> > --------------------------------------------------------------------- >>> > To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org >>> > For additional commands, e-mail: dev-help@lucene.apache.org >>> > >>> > >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org >>> For additional commands, e-mail: dev-help@lucene.apache.org >>> >>> >> > > > -- > Chris Male | Software Developer | DutchWorks | www.dutchworks.nl > --20cf3074da56ef9ee004afc4bf75 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable That could work, but what happens when the user doesn't want indexing, = ie, indexed =3D false? I guess the IndexOptions argument could be ignored i= f no indexing is taking place, but then we are forcing the user to enter a = dummy parameter.

On Thu, Oct 20, 2011 at 8:52 PM, Chris Male = <gento0nz@gmail.= com> wrote:
I really favour sticking to the existing enum and don't think we should= unravel them into int flags for the reasons already put forward.

<= /div>
Having thought about my original concern, I think its best we don= 't make it an optional argument, we should force users to specify what = IndexOptions they want explicitly.

On Fr= i, Oct 21, 2011 at 1:42 PM, Adnan Duric <aduric@gmail.com> wr= ote:
We can pass an enum member individually (DOCS_ONLY, DOCS_AND_FREQS...) to t= he ctor to prevent=A0inconsistencies. This way we would have the same numbe= r of extra arguments as splitting them, and no complex pair checking betwee= n them.


On Thu, Oct 20, 2011 at 6:40 PM, Simon Willn= auer <simon.willnauer@googlemail.com> wrote:
On Thu, Oct 20, 2011 at 10:35 PM, Robert Muir <rcmuir@gmail.com> wrote:
> On Thu, Oct 20, 2011 at 8:16 PM, Michael McCandless
> <luc= ene@mikemccandless.com> wrote:
>
>> We'd need checking in FT's ctor to catch wrong pairings, e= g you cannot
>> turn ont POSITIONS unless you also turn on FREQS, and at least DOC= S
>> must be set if INDEXED is set.
>>
>
> What is the problem with the enum? it prevents these inconsistencies..= .
+1 to stick to enums here!

>
>
> --
> lucidimagina= tion.com
>
> ---------------------------------------------------------------------<= br> > To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org





<= /div>
--
Chris Male | Software Developer | DutchWorks = | www.dutchworks.nl<= /a>

--20cf3074da56ef9ee004afc4bf75--