code: private static Field.Index getIndexParameter(int flags)
     {
        if ((flags & INDEXED_FLAG) == 0)
        {
           return Field.Index.NO;
        }
        else if ((flags & TOKENIZED_FLAG) > 0)
        {
           return Field.Index.ANALYZED;
        }
        else
        {
           return Field.Index.NOT_ANALYZED;
        }
     }
docs: Returns the index parameter extracted from the flags.
  
  @param flags the flags of the Lucene field.
  @return the index parameter corresponding to the given flags.