class Index(SignalEmitter): (source)
The Index keeps a cache of all pages in a notebook store, all links between pages and all tags. This data is used to speed up many operatons in the user interface, like showing the notebook index in the side pane, showing "what links here" and faster search for page attributes.
The Index object is an opaque object that only exposes an API to trigger index updates and notifications when changes are found. It does not expose the data it keeps directly. To query the index, you need to construct an "index view" first, see e.g. the PagesIndexView
, LinksIndexView
and TagsIndexView
classes. For convenience the Notebook
class also exposes these three views with the respective attributes pages, links and tags.
Unknown Field: signal | |
new-update-iter (update_iter): signal used for plugins wanting to extend the indexer | |
changed (): emitted after changes have been committed |
Method | __init__ |
Constructor @param dbpath: a file path for the sqlite db, or ":memory:" @param layout: a NotebookLayout instance to index |
Method | check_and_update |
Check and update all data in the index |
Method | check_and_update_iter |
Undocumented |
Method | check_async |
Undocumented |
Method | file_moved |
Undocumented |
Method | flag_reindex |
No summary |
Method | flush |
Delete all data in the index |
Method | get_property |
Undocumented |
Method | on_commit |
Undocumented |
Method | remove_file |
Undocumented |
Method | set_property |
Undocumented |
Method | start_background_check |
Undocumented |
Method | stop_background_check |
Undocumented |
Method | touch_current_page_placeholder |
Create a placeholder for path if the page does not exist. Cleans up old placeholders. |
Method | update |
Update all data in the index |
Method | update_file |
Undocumented |
Class Variable | __signals__ |
Undocumented |
Instance Variable | background_check |
Undocumented |
Instance Variable | dbpath |
Undocumented |
Instance Variable | layout |
Undocumented |
Instance Variable | update_iter |
Undocumented |
Property | is_uptodate |
Undocumented |
Method | _db_connect |
Undocumented |
Method | _db_init |
Undocumented |
Method | _db_recover |
Undocumented |
Method | _update_iter_init |
Undocumented |
Instance Variable | _checker |
Undocumented |
Instance Variable | _db |
Undocumented |
Inherited from SignalEmitter
:
Method | __new__ |
Undocumented |
Method | block_signals |
Returns a context manager for blocking one or more signals |
Method | connect |
Register a handler for a specific object. |
Method | connect_after |
Like connect() but handler will be called after default handler |
Method | disconnect |
Undocumented |
Method | emit |
Undocumented |
Method | emit_return_first |
Emits a signal and stops emission on the first handler that returns a not-None value. |
Method | emit_return_iter |
Returns an generator that calls one handler on each iteration and yields the return values. This allows aggregating return values. |
Method | _connect |
Undocumented |
Method | _setup_signal |
Undocumented |
Method | _teardown_signal |
Undocumented |
Parameters | |
dbpath | a file path for the sqlite db, or ":memory:" |
layout | a NotebookLayout instance to index |
flush()
because it does not drop all data