You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lucenenet.apache.org by Michael Mitiaguin <mi...@gmail.com> on 2008/01/03 06:58:47 UTC

Reading field parameters from XML

May I avoid somehow switch/case if/else code if I read field
parameters from XML file.

                  switch (dfAttr.index )
                    {
                        case "TOKENIZED":
                            dfAttrs[i].fi = Field.Index.TOKENIZED ;
                            break;
                        case "UN_TOKENIZED":
                            dfAttrs[i].fi = Field.Index.UN_TOKENIZED;
                            break;
                    }

I have to repeat that for Store , TermVector  unless shorter way is found.