Warning
This document is for an old release of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.
galaxy.tools.search package¶
Module for building and searching the index of tools installed within this Galaxy. Before changing index-building or searching related parts it is deeply recommended to read through the library docs at https://whoosh.readthedocs.io.
-
galaxy.tools.search.
get_or_create_index
(index_dir: str, schema: whoosh.fields.Schema) → whoosh.index.Index[source]¶
-
class
galaxy.tools.search.
ToolBoxSearch
(toolbox, index_dir: str, index_help: bool = True)[source]¶ Bases:
object
Support searching across all fixed panel views in a toolbox.
Search is delegated off to ToolPanelViewSearch for each panel object.
-
class
galaxy.tools.search.
ToolPanelViewSearch
(toolbox, panel_view_id: str, index_dir: str, index_help: bool = True)[source]¶ Bases:
object
Support searching tools in a toolbox. This implementation uses the Whoosh search library.
-
__init__
(toolbox, panel_view_id: str, index_dir: str, index_help: bool = True)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
build_index
(tool_cache, index_help: bool = True) → None[source]¶ Prepare search index for tools loaded in toolbox. Use tool_cache to determine which tools need indexing and which tools should be expired.
-
search
(q: str, tool_name_boost: Union[str, int, float], tool_id_boost: Union[str, int, float], tool_section_boost: Union[str, int, float], tool_description_boost: Union[str, int, float], tool_label_boost: Union[str, int, float], tool_stub_boost: Union[str, int, float], tool_help_boost: Union[str, int, float], tool_search_limit: Union[str, int, float], tool_enable_ngram_search: bool, tool_ngram_minsize: Union[str, int, float], tool_ngram_maxsize: Union[str, int, float]) → List[str][source]¶ Perform search on the in-memory index. Weight in the given boosts.
-