Module ImportFrom alias alias alias Import alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Return Call NameLoad NameLoad keyword NameLoad keyword NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Import alias If Call NameLoad NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad keyword NameLoad Assign NameStore NameLoad orelse If Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore NameLoad Assign NameStore NameLoad orelse Raise Call NameLoad BinOpMod Str NameLoad TryFinally body TryExcept body If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Expr Yield NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr For TupleStore NameStore NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr body Expr Yield Call NameLoad NameLoad orelse Assign NameStore BinOpAdd TupleLoad NameLoad Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Expr Yield NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr For TupleStore NameStore NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr body Expr Yield BinOpAdd TupleLoad NameLoad Call NameLoad NameLoad handlers ExceptHandler body Raise finalbody If NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Import alias Import alias If Call NameLoad NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword NameLoad Assign NameStore NameLoad orelse If Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore NameLoad Assign NameStore NameLoad orelse Raise Call NameLoad BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr TryFinally body TryExcept body For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr Raise finalbody If NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Import alias If Call NameLoad NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad keyword NameLoad Assign NameStore NameLoad orelse If Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore NameLoad Assign NameStore NameLoad orelse Raise Call NameLoad BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr TryFinally body TryExcept body For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Raise finalbody If NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Return Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Return Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Import alias Import alias Import alias If UnaryOpNot NameLoad body Assign NameStore Call NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad keyword NameLoad Assign NameStore NameLoad orelse If Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore NameLoad Assign NameStore NameLoad orelse Raise Call NameLoad BinOpMod Str NameLoad TryFinally body TryExcept body Assign NameStore Call NameLoad If CompareIsNot NameLoad NameLoad body AugAssignAdd NameStore TupleLoad NameLoad If CompareIsNot NameLoad NameLoad body AugAssignAdd NameStore TupleLoad NameLoad Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AugAssignAdd NameStore NameLoad Expr Yield NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse If Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr body Pass orelse Raise Call NameLoad BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr With Call AttributeLoad NameLoad attr NameStore body If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad NameLoad If BoolOpAnd CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body For NameStore NameLoad body Expr Yield Call NameLoad NameLoad orelse For TupleStore TupleStore NameStore NameStore NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad If CompareIsNot NameLoad NameLoad body AugAssignAdd NameStore TupleLoad NameLoad If CompareIsNot NameLoad NameLoad body AugAssignAdd NameStore TupleLoad NameLoad AugAssignAdd NameStore Call NameLoad NameLoad Expr Yield NameLoad handlers ExceptHandler body Raise finalbody If NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list
N/A __future__ absolute_import print_function division N/A operator petl.compat string_types izip petl.errors ArgumentError petl.util.base Table dicts fromtextindex N/A N/A index_or_dirname indexname docnum_field N/A None None N/A N/A 
    Extract all documents from a Whoosh index. E.g.::

        >>> import petl as etl
        >>> import os
        >>> # set up an index and load some documents via the Whoosh API
        ... from whoosh.index import create_in
        >>> from whoosh.fields import *
        >>> schema = Schema(title=TEXT(stored=True), path=ID(stored=True),
        ...                 content=TEXT)
        >>> dirname = 'example.whoosh'
        >>> if not os.path.exists(dirname):
        ...     os.mkdir(dirname)
        ...
        >>> index = create_in(dirname, schema)
        >>> writer = index.writer()
        >>> writer.add_document(title=u"First document", path=u"/a",
        ...                     content=u"This is the first document we've added!")
        >>> writer.add_document(title=u"Second document", path=u"/b",
        ...                     content=u"The second one is even more interesting!")
        >>> writer.commit()
        >>> # extract documents as a table
        ... table = etl.fromtextindex(dirname)
        >>> table
        +------+-------------------+
        | path | title             |
        +======+===================+
        | '/a' | 'First document'  |
        +------+-------------------+
        | '/b' | 'Second document' |
        +------+-------------------+

    Keyword arguments:
    
    index_or_dirname
        Either an instance of `whoosh.index.Index` or a string containing the
        directory path where the index is stored.
    indexname
        String containing the name of the index, if multiple indexes are stored
        in the same directory.
    docnum_field
        If not None, an extra field will be added to the output table containing
        the internal document number stored in the index. The name of the field
        will be the value of this argument.

     N/A N/A TextIndexView index_or_dirname indexname indexname docnum_field docnum_field N/A TextIndexView N/A Table N/A __init__ N/A N/A self index_or_dirname indexname docnum_field N/A None None N/A N/A N/A self index_or_dirname index_or_dirname N/A N/A self indexname indexname N/A N/A self docnum_field docnum_field N/A __iter__ N/A N/A self N/A N/A N/A N/A itertextindex N/A self index_or_dirname N/A self indexname N/A self docnum_field N/A N/A itertextindex N/A N/A index_or_dirname indexname docnum_field N/A N/A N/A whoosh.index N/A N/A isinstance index_or_dirname string_types N/A N/A dirname index_or_dirname N/A index N/A N/A N/A whoosh index open_dir dirname indexname indexname readonly True N/A needs_closing True N/A N/A N/A isinstance index_or_dirname N/A N/A whoosh index Index N/A N/A index index_or_dirname N/A needs_closing False N/A N/A N/A ArgumentError N/A expected string or index, found %r index_or_dirname N/A N/A N/A N/A N/A N/A docnum_field None N/A N/A hdr N/A tuple N/A N/A N/A index schema stored_names N/A N/A hdr N/A astuple N/A N/A operator itemgetter N/A N/A N/A index schema stored_names N/A N/A _ stored_fields_dict N/A N/A N/A N/A index reader iter_docs N/A N/A N/A N/A astuple stored_fields_dict N/A N/A hdr N/A N/A docnum_field N/A tuple N/A N/A N/A index schema stored_names N/A N/A hdr N/A astuple N/A N/A operator itemgetter N/A N/A N/A index schema stored_names N/A N/A docnum stored_fields_dict N/A N/A N/A N/A index reader iter_docs N/A N/A N/A N/A N/A docnum N/A astuple stored_fields_dict N/A N/A N/A N/A N/A N/A needs_closing N/A N/A N/A N/A index close N/A totextindex N/A N/A table index_or_dirname schema indexname merge optimize N/A None None False False N/A N/A 
    Load all rows from `table` into a Whoosh index. N.B., this will clear any
    existing data in the index before loading. E.g.::

        >>> import petl as etl
        >>> import datetime
        >>> import os
        >>> # here is the table we want to load into an index
        ... table = (('f0', 'f1', 'f2', 'f3', 'f4'),
        ...          ('AAA', 12, 4.3, True, datetime.datetime.now()),
        ...          ('BBB', 6, 3.4, False, datetime.datetime(1900, 1, 31)),
        ...          ('CCC', 42, 7.8, True, datetime.datetime(2100, 12, 25)))
        >>> # define a schema for the index
        ... from whoosh.fields import *
        >>> schema = Schema(f0=TEXT(stored=True),
        ...                 f1=NUMERIC(int, stored=True),
        ...                 f2=NUMERIC(float, stored=True),
        ...                 f3=BOOLEAN(stored=True),
        ...                 f4=DATETIME(stored=True))
        >>> # load index
        ... dirname = 'example.whoosh'
        >>> if not os.path.exists(dirname):
        ...     os.mkdir(dirname)
        ...
        >>> etl.totextindex(table, dirname, schema=schema)

    Keyword arguments:

    table
        A table container with the data to be loaded.
    index_or_dirname
        Either an instance of `whoosh.index.Index` or a string containing the
        directory path where the index is to be stored.
    schema
        Index schema to use if creating the index.
    indexname
        String containing the name of the index, if multiple indexes are stored
        in the same directory.
    merge
        Merge small segments during commit?
    optimize
        Merge all segments together?

     N/A whoosh.index N/A whoosh.writing N/A N/A isinstance index_or_dirname string_types N/A N/A dirname index_or_dirname N/A index N/A N/A N/A whoosh index create_in dirname schema indexname indexname N/A needs_closing True N/A N/A N/A isinstance index_or_dirname N/A N/A whoosh index Index N/A N/A index index_or_dirname N/A needs_closing False N/A N/A N/A ArgumentError N/A expected string or index, found %r index_or_dirname N/A writer N/A N/A index writer N/A N/A N/A N/A N/A d N/A dicts table N/A N/A N/A N/A writer add_document d N/A N/A N/A writer commit merge merge optimize optimize mergetype N/A N/A whoosh writing CLEAR N/A N/A N/A N/A N/A N/A writer cancel N/A N/A N/A needs_closing N/A N/A N/A N/A index close N/A appendtextindex N/A N/A table index_or_dirname indexname merge optimize N/A None True False N/A N/A 
    Load all rows from `table` into a Whoosh index, adding them to any existing
    data in the index.

    Keyword arguments:

    table
        A table container with the data to be loaded.
    index_or_dirname
        Either an instance of `whoosh.index.Index` or a string containing the
        directory path where the index is to be stored.
    indexname
        String containing the name of the index, if multiple indexes are stored
        in the same directory.
    merge
        Merge small segments during commit?
    optimize
        Merge all segments together?

     N/A whoosh.index N/A N/A isinstance index_or_dirname string_types N/A N/A dirname index_or_dirname N/A index N/A N/A N/A whoosh index open_dir dirname indexname indexname readonly False N/A needs_closing True N/A N/A N/A isinstance index_or_dirname N/A N/A whoosh index Index N/A N/A index index_or_dirname N/A needs_closing False N/A N/A N/A ArgumentError N/A expected string or index, found %r index_or_dirname N/A writer N/A N/A index writer N/A N/A N/A N/A N/A d N/A dicts table N/A N/A N/A N/A writer add_document d N/A N/A N/A writer commit merge merge optimize optimize N/A N/A N/A Exception N/A N/A N/A N/A writer cancel N/A N/A N/A needs_closing N/A N/A N/A N/A index close N/A searchtextindex N/A N/A index_or_dirname query limit indexname docnum_field score_field fieldboosts search_kwargs N/A 10 None None None None None N/A N/A 
    Search a Whoosh index using a query. E.g.::

        >>> import petl as etl
        >>> import os
        >>> # set up an index and load some documents via the Whoosh API
        ... from whoosh.index import create_in
        >>> from whoosh.fields import *
        >>> schema = Schema(title=TEXT(stored=True), path=ID(stored=True),
        ...                            content=TEXT)
        >>> dirname = 'example.whoosh'
        >>> if not os.path.exists(dirname):
        ...     os.mkdir(dirname)
        ...
        >>> index = create_in('example.whoosh', schema)
        >>> writer = index.writer()
        >>> writer.add_document(title=u"Oranges", path=u"/a",
        ...                     content=u"This is the first document we've added!")
        >>> writer.add_document(title=u"Apples", path=u"/b",
        ...                     content=u"The second document is even more "
        ...                             u"interesting!")
        >>> writer.commit()
        >>> # demonstrate the use of searchtextindex()
        ... table1 = etl.searchtextindex('example.whoosh', 'oranges')
        >>> table1
        +------+-----------+
        | path | title     |
        +======+===========+
        | '/a' | 'Oranges' |
        +------+-----------+

        >>> table2 = etl.searchtextindex('example.whoosh', 'doc*')
        >>> table2
        +------+-----------+
        | path | title     |
        +======+===========+
        | '/a' | 'Oranges' |
        +------+-----------+
        | '/b' | 'Apples'  |
        +------+-----------+

    Keyword arguments:

    index_or_dirname
        Either an instance of `whoosh.index.Index` or a string containing the
        directory path where the index is to be stored.
    query
        Either a string or an instance of `whoosh.query.Query`. If a string,
        it will be parsed as a multi-field query, i.e., any terms not bound
        to a specific field will match **any** field.
    limit
        Return at most `limit` results.
    indexname
        String containing the name of the index, if multiple indexes are stored
        in the same directory.
    docnum_field
        If not None, an extra field will be added to the output table containing
        the internal document number stored in the index. The name of the field
        will be the value of this argument.
    score_field
        If not None, an extra field will be added to the output table containing
        the score of the result. The name of the field will be the value of this
        argument.
    fieldboosts
        An optional dictionary mapping field names to boosts.
    search_kwargs
        Any extra keyword arguments to be passed through to the Whoosh
        `search()` method.

     N/A N/A SearchTextIndexView index_or_dirname query limit limit indexname indexname docnum_field docnum_field score_field score_field fieldboosts fieldboosts search_kwargs search_kwargs N/A searchtextindexpage N/A N/A index_or_dirname query pagenum pagelen indexname docnum_field score_field fieldboosts search_kwargs N/A 10 None None None None None N/A N/A 
    Search an index using a query, returning a result page.

    Keyword arguments:

    index_or_dirname
        Either an instance of `whoosh.index.Index` or a string containing the
        directory path where the index is to be stored.
    query
        Either a string or an instance of `whoosh.query.Query`. If a string,
        it will be parsed as a multi-field query, i.e., any terms not bound
        to a specific field will match **any** field.
    pagenum
        Number of the page to return (e.g., 1 = first page).
    pagelen
        Number of results per page.
    indexname
        String containing the name of the index, if multiple indexes are stored
        in the same directory.
    docnum_field
        If not None, an extra field will be added to the output table containing
        the internal document number stored in the index. The name of the field
        will be the value of this argument.
    score_field
        If not None, an extra field will be added to the output table containing
        the score of the result. The name of the field will be the value of this
        argument.
    fieldboosts
        An optional dictionary mapping field names to boosts.
    search_kwargs
        Any extra keyword arguments to be passed through to the Whoosh
        `search()` method.

     N/A N/A SearchTextIndexView index_or_dirname query pagenum pagenum pagelen pagelen indexname indexname docnum_field docnum_field score_field score_field fieldboosts fieldboosts search_kwargs search_kwargs N/A SearchTextIndexView N/A Table N/A __init__ N/A N/A self index_or_dirname query limit pagenum pagelen indexname docnum_field score_field fieldboosts search_kwargs N/A None None None None None None None None N/A N/A N/A self _index_or_dirname index_or_dirname N/A N/A self _query query N/A N/A self _limit limit N/A N/A self _pagenum pagenum N/A N/A self _pagelen pagelen N/A N/A self _indexname indexname N/A N/A self _docnum_field docnum_field N/A N/A self _score_field score_field N/A N/A self _fieldboosts fieldboosts N/A N/A self _search_kwargs search_kwargs N/A __iter__ N/A N/A self N/A N/A N/A N/A itersearchindex N/A self _index_or_dirname N/A self _query N/A self _limit N/A self _pagenum N/A self _pagelen N/A self _indexname N/A self _docnum_field N/A self _score_field N/A self _fieldboosts N/A self _search_kwargs N/A N/A itersearchindex N/A N/A index_or_dirname query limit pagenum pagelen indexname docnum_field score_field fieldboosts search_kwargs N/A N/A N/A whoosh.index N/A whoosh.query N/A whoosh.qparser N/A N/A search_kwargs N/A N/A search_kwargs N/A dict N/A N/A isinstance index_or_dirname string_types N/A N/A dirname index_or_dirname N/A index N/A N/A N/A whoosh index open_dir dirname indexname indexname readonly True N/A needs_closing True N/A N/A N/A isinstance index_or_dirname N/A N/A whoosh index Index N/A N/A index index_or_dirname N/A needs_closing False N/A N/A N/A ArgumentError N/A expected string or index, found %r index_or_dirname N/A N/A N/A N/A N/A hdr N/A tuple N/A N/A docnum_field None N/A N/A hdr N/A docnum_field N/A N/A score_field None N/A N/A hdr N/A score_field N/A stored_names N/A tuple N/A N/A N/A index schema stored_names N/A hdr stored_names N/A N/A hdr N/A N/A isinstance query string_types N/A N/A parser N/A N/A N/A whoosh qparser MultifieldParser N/A N/A N/A index schema names N/A index schema fieldboosts fieldboosts N/A query N/A N/A parser parse query N/A N/A N/A isinstance query N/A N/A whoosh query Query N/A N/A N/A N/A N/A ArgumentError N/A expected string or whoosh.query.Query, found %r query N/A astuple N/A N/A operator itemgetter N/A N/A N/A index schema stored_names N/A N/A N/A index searcher searcher N/A N/A N/A limit None N/A N/A results N/A N/A searcher search query limit limit search_kwargs N/A N/A results N/A N/A searcher search_page query pagenum pagelen pagelen search_kwargs N/A N/A N/A docnum_field None N/A score_field None N/A N/A doc results N/A N/A N/A N/A astuple doc N/A N/A N/A N/A docnum score doc N/A izip N/A N/A results items results N/A N/A row N/A tuple N/A N/A docnum_field None N/A N/A row N/A docnum N/A N/A score_field None N/A N/A row N/A score N/A row N/A astuple doc N/A N/A row N/A N/A N/A N/A N/A N/A needs_closing N/A N/A N/A N/A index close N/A