flask_whooshee :: WhoosheeQuery :: Class WhoosheeQuery
[hide private]
[frames] | no frames]

Class WhoosheeQuery


An override for SQLAlchemy query used to do fulltext search.

Instance Methods [hide private]
 
whooshee_search(self, search_string, group=<class 'whoosh.qparser.syntax.OrGroup'>, match_substrings=True, limit=None)
Do a fulltext search on the query.

Inherited from flask_sqlalchemy.BaseQuery: first_or_404, get_or_404, paginate

Inherited from sqlalchemy.orm.query.Query: __clause_element__, __getitem__, __init__, __iter__, __str__, add_column, add_columns, add_entity, all, as_scalar, autoflush, correlate, count, cte, delete, dispatch, distinct, enable_assertions, enable_eagerloads, except_, except_all, execution_options, exists, filter, filter_by, first, from_self, from_statement, get, group_by, having, instances, intersect, intersect_all, join, label, limit, merge_result, offset, one, one_or_none, options, order_by, outerjoin, params, populate_existing, prefix_with, reset_joinpoint, scalar, select_entity_from, select_from, slice, subquery, suffix_with, union, union_all, update, value, values, with_entities, with_for_update, with_hint, with_labels, with_lockmode, with_parent, with_polymorphic, with_session, with_statement_hint, with_transformation, yield_per

Inherited from sqlalchemy.orm.query.Query (private): _adapt_all_clauses, _adapt_clause, _adapt_col_list, _adapt_polymorphic_element, _adjust_for_single_inheritance, _bind_mapper, _clone, _compile_context, _compound_eager_statement, _conditional_options, _connection_from_session, _entity_zero, _execute_and_instances, _from_selectable, _get_condition, _get_existing_condition, _get_impl, _get_options, _join, _join_left_to_right, _join_to_left, _joinpoint_zero, _mapper_loads_polymorphically_with, _mapper_zero, _no_clauseelement_condition, _no_criterion_assertion, _no_criterion_condition, _no_limit_offset, _no_statement_condition, _no_yield_per, _only_entity_zero, _only_full_mapper_zero, _only_mapper_zero, _options, _prepare_right_side, _reset_joinpoint, _reset_polymorphic_adapter, _set_enable_single_crit, _set_entities, _set_entity_selectables, _set_select_from, _should_log_debug, _should_log_info, _simple_statement, _update_joinpoint, _values, _with_current_path, _with_invoke_all_eagers

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]

Inherited from sqlalchemy.orm.query.Query: logger

Inherited from sqlalchemy.orm.query.Query (private): _attributes, _autoflush, _correlate, _criterion, _current_path, _distinct, _enable_assertions, _enable_eagerloads, _enable_single_crit, _execution_options, _filter_aliases, _for_update_arg, _from_obj, _from_obj_alias, _group_by, _having, _invoke_all_eagers, _join_entities, _joinpath, _joinpoint, _limit, _mapper_adapter_map, _offset, _only_load_props, _order_by, _orm_only_adapt, _orm_only_from_obj_alias, _params, _populate_existing, _prefixes, _refresh_state, _select_from_entity, _statement, _suffixes, _version_check, _with_hints, _with_labels, _with_options, _yield_per

Properties [hide private]

Inherited from sqlalchemy.orm.query.Query: column_descriptions, selectable, statement, whereclause

Inherited from sqlalchemy.orm.query.Query (private): _mapper_entities, _select_args, _should_nest_selectable

Inherited from object: __class__

Method Details [hide private]

whooshee_search(self, search_string, group=<class 'whoosh.qparser.syntax.OrGroup'>, match_substrings=True, limit=None)

 
Do a fulltext search on the query.

Args:
    search_string: string to search for
    group: whoosh group to use for searching, defaults to OrGroup (searches for all
           words in all columns)
    match_substrings: True if you want to match substrings, False otherwise
    limit: number of the top records to be returned, default None returns all records

Returns:
    query filtered with results of the fulltext search