Hi

You could create a three static maps between the String and and appropriate
Index/Store/TermVector objects. Those maps are not expensive, and are far
more efficient than the String comparisons ...
If you choose to stick with String comparisons, you might wanna check using
Collator instead of String.equals as it is more efficient for comparing
strings.

On Jan 3, 2008 7:33 AM, Michael Mitiaguin <[EMAIL PROTECTED]> wrote:

> I want to keep index parameters in XML.
> e.g.
>        <Field name="description" store="NO" index="TOKENIZED"
> termvector="WITH_OFFSETS" >
>
> May I avoid switch/case  , if/else in my code
> and assign somehow Field.Store, Field.Index  and etc...  based on string
> value.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Regards,

Shai Erera

Reply via email to