(self, analyzer=None, phrase=True, chars=False, vector=None,
                 stored=False, field_boost=1.0, multitoken_query="default",
                 spelling=False, sortable=False, lang=None)
:param analyzer: The analysis.Analyzer to use to index the field
            contents. See the analysis module for more information. If you omit
            this argument, the field uses analysis.StandardAnalyzer.
        :param phrase: Whether the store positional information to allow phrase
            searching.
        :param chars: Whether to store character ranges along with positions.
            If this is True, "phrase" is also implied.
        :param vector: A :class:`whoosh.formats.Format` object to use to store
            term vectors, or ``True`` to store vectors using the same format as
            the inverted index, or ``None`` or ``False`` to not store vectors.
            By default, fields do not store term vectors.
        :param stored: Whether to store the value of this field with the
            document. Since this field type generally contains a lot of text,
            you should avoid storing it with the document unless you need to,
            for example to allow fast excerpts in the search results.
        :param spelling: Whether to generate word graphs for this field to make
            spelling suggestions much faster.
        :param sortable: If True, make this field sortable using the default
            column type. If you pass a :class:`whoosh.columns.Column` instance
            instead of True, the field will use the given column type.
        :param lang: automaticaly configure a
            :class:`whoosh.analysis.LanguageAnalyzer` for the given language.
            This is ignored if you also specify an ``analyzer``.
:param analyzer: The analysis.Analyzer to use to index the field
            contents. See the analysis module for more information. If you omit
            this argument, the field uses analysis.StandardAnalyzer.
        :param phrase: Whether the store positional information to allow phrase
            searching.
        :param chars: Whether to store character ranges along with positions.
            If this is True, "phrase" is also implied.
        :param vector: A :class:`whoosh.formats.Format` object to use to store
            term vectors, or ``True`` to store vectors using the same format as
            the inverted index, or ``None`` or ``False`` to not store vectors.
            By default, fields do not store term vectors.
        :param stored: Whether to store the value of this field with the
            document. Since this field type generally contains a lot of text,
            you should avoid storing it with the document unless you need to,
            for example to allow fast excerpts in the search results.
        :param spelling: Whether to generate word graphs for this field to make
            spelling suggestions much faster.
        :param sortable: If True, make this field sortable using the default
            column type. If you pass a :class:`whoosh.columns.Column` instance
            instead of True, the field will use the given column type.
        :param lang: automaticaly configure a
            :class:`whoosh.analysis.LanguageAnalyzer` for the given language.
            This is ignored if you also specify an ``analyzer``.
: param analyzer : The analysis . Analyzer to use to index the field contents . See the analysis module for more information . If you omit this argument the field uses analysis . StandardAnalyzer . : param phrase : Whether the store positional information to allow phrase searching . : param chars : Whether to store character ranges along with positions . If this is True phrase is also implied . : param vector : A : class : whoosh . formats . Format object to use to store term vectors or True to store vectors using the same format as the inverted index or None or False to not store vectors . By default fields do not store term vectors . : param stored : Whether to store the value of this field with the document . Since this field type generally contains a lot of text you should avoid storing it with the document unless you need to for example to allow fast excerpts in the search results . : param spelling : Whether to generate word graphs for this field to make spelling suggestions much faster . : param sortable : If True make this field sortable using the default column type . If you pass a : class : whoosh . columns . Column instance instead of True the field will use the given column type . : param lang : automaticaly configure a : class : whoosh . analysis . LanguageAnalyzer for the given language . This is ignored if you also specify an analyzer .
def __init__(self, analyzer=None, phrase=True, chars=False, vector=None,
                 stored=False, field_boost=1.0, multitoken_query="default",
                 spelling=False, sortable=False, lang=None):
        """
        :param analyzer: The analysis.Analyzer to use to index the field
            contents. See the analysis module for more information. If you omit
            this argument, the field uses analysis.StandardAnalyzer.
        :param phrase: Whether the store positional information to allow phrase
            searching.
        :param chars: Whether to store character ranges along with positions.
            If this is True, "phrase" is also implied.
        :param vector: A :class:`whoosh.formats.Format` object to use to store
            term vectors, or ``True`` to store vectors using the same format as
            the inverted index, or ``None`` or ``False`` to not store vectors.
            By default, fields do not store term vectors.
        :param stored: Whether to store the value of this field with the
            document. Since this field type generally contains a lot of text,
            you should avoid storing it with the document unless you need to,
            for example to allow fast excerpts in the search results.
        :param spelling: Whether to generate word graphs for this field to make
            spelling suggestions much faster.
        :param sortable: If True, make this field sortable using the default
            column type. If you pass a :class:`whoosh.columns.Column` instance
            instead of True, the field will use the given column type.
        :param lang: automaticaly configure a
            :class:`whoosh.analysis.LanguageAnalyzer` for the given language.
            This is ignored if you also specify an ``analyzer``.
        """

        if analyzer:
            self.analyzer = analyzer
        elif lang:
            self.analyzer = analysis.LanguageAnalyzer(lang)
        else:
            self.analyzer = analysis.StandardAnalyzer()

        if chars:
            formatclass = formats.Characters
        elif phrase:
            formatclass = formats.Positions
        else:
            formatclass = formats.Frequency
        self.format = formatclass(field_boost=field_boost)

        if vector:
            if type(vector) is type:
                vector = vector()
            elif isinstance(vector, formats.Format):
                pass
            else:
                vector = formatclass()
        else:
            vector = None
        self.vector = vector

        if sortable:
            if isinstance(sortable, columns.Column):
                self.column_type = sortable
            else:
                self.column_type = columns.VarBytesColumn()
        else:
            self.column_type = None

        self.multitoken_query = multitoken_query
        self.scorable = True
        self.stored = stored
        self.spelling = spelling
def __init__ ( self , analyzer = None , phrase = True , chars = False , vector = None , stored = False , field_boost = 1.0 , multitoken_query = "default" , spelling = False , sortable = False , lang = None ) : if analyzer : self . analyzer = analyzer elif lang : self . analyzer = analysis . LanguageAnalyzer ( lang ) else : self . analyzer = analysis . StandardAnalyzer ( ) if chars : formatclass = formats . Characters elif phrase : formatclass = formats . Positions else : formatclass = formats . Frequency self . format = formatclass ( field_boost = field_boost ) if vector : if type ( vector ) is type : vector = vector ( ) elif isinstance ( vector , formats . Format ) : pass else : vector = formatclass ( ) else : vector = None self . vector = vector if sortable : if isinstance ( sortable , columns . Column ) : self . column_type = sortable else : self . column_type = columns . VarBytesColumn ( ) else : self . column_type = None self . multitoken_query = multitoken_query self . scorable = True self . stored = stored self . spelling = spelling