Akonadi::PersistentSearchAttribute
#include <persistentsearchattribute.h>
Public Member Functions | |
PersistentSearchAttribute () | |
~PersistentSearchAttribute () override | |
bool | isRecursive () const |
bool | isRemoteSearchEnabled () const |
QList< qint64 > | queryCollections () const |
QString | queryString () const |
void | setQueryCollections (const QList< Collection > &collections) |
void | setQueryCollections (const QList< qint64 > &collectionsIds) |
void | setQueryString (const QString &query) |
void | setRecursive (bool recursive) |
void | setRemoteSearchEnabled (bool enabled) |
Public Member Functions inherited from Akonadi::Attribute | |
virtual | ~Attribute () |
virtual Attribute * | clone () const =0 |
virtual void | deserialize (const QByteArray &data)=0 |
virtual QByteArray | serialized () const =0 |
virtual QByteArray | type () const =0 |
Additional Inherited Members | |
Public Types inherited from Akonadi::Attribute | |
using | List = QList<Attribute *> |
Protected Member Functions inherited from Akonadi::Attribute | |
Attribute (const Attribute &)=default | |
Detailed Description
An attribute to store query properties of persistent search collections.
This attribute is attached to persistent search collections automatically when creating a new persistent search with SearchCreateJob. Later on the search query can be changed by modifying this attribute of the persistent search collection with an CollectionModifyJob.
Example:
- Since
- 4.5
Definition at line 63 of file persistentsearchattribute.h.
Constructor & Destructor Documentation
◆ PersistentSearchAttribute()
|
explicit |
Creates a new persistent search attribute.
Definition at line 26 of file persistentsearchattribute.cpp.
◆ ~PersistentSearchAttribute()
|
overridedefault |
Destroys the persistent search attribute.
Member Function Documentation
◆ isRecursive()
|
nodiscard |
Returns whether the search is recursive.
- Since
- 4.13
Definition at line 62 of file persistentsearchattribute.cpp.
◆ isRemoteSearchEnabled()
|
nodiscard |
Returns whether remote search is enabled.
- Since
- 4.13
Definition at line 72 of file persistentsearchattribute.cpp.
◆ queryCollections()
|
nodiscard |
Returns IDs of collections that will be queried.
- Since
- 4.13
Definition at line 43 of file persistentsearchattribute.cpp.
◆ queryString()
|
nodiscard |
Returns the query string used for this search.
Definition at line 33 of file persistentsearchattribute.cpp.
◆ setQueryCollections() [1/2]
void PersistentSearchAttribute::setQueryCollections | ( | const QList< Collection > & | collections | ) |
Sets collections to be queried.
- Parameters
-
collections List of collections to be queries
- Since
- 4.13
Definition at line 48 of file persistentsearchattribute.cpp.
◆ setQueryCollections() [2/2]
void PersistentSearchAttribute::setQueryCollections | ( | const QList< qint64 > & | collectionsIds | ) |
Sets IDs of collections to be queries.
- Parameters
-
collectionsIds IDs of collections to query
- Since
- 4.13
Definition at line 57 of file persistentsearchattribute.cpp.
◆ setQueryString()
void PersistentSearchAttribute::setQueryString | ( | const QString & | query | ) |
Sets the query string to be used for this search.
- Parameters
-
query The query string.
Definition at line 38 of file persistentsearchattribute.cpp.
◆ setRecursive()
void PersistentSearchAttribute::setRecursive | ( | bool | recursive | ) |
Sets whether the search should recurse into collections.
When set to true, all child collections of the specific collections will be search recursively.
- Parameters
-
recursive Whether to search recursively
- Since
- 4.13
Definition at line 67 of file persistentsearchattribute.cpp.
◆ setRemoteSearchEnabled()
void PersistentSearchAttribute::setRemoteSearchEnabled | ( | bool | enabled | ) |
Sets whether resources should be queried too.
When set to true, Akonadi will search local indexed items and will also query resources that support server-side search, to forward the query to remote storage (for example using SEARCH feature on IMAP servers) and merge their results with results from local index.
This is useful especially when searching resources, that don't fetch full payload by default, for example the IMAP resource, which only fetches headers by default and the body is fetched on demand, which means that emails that were not yet fully fetched cannot be indexed in local index, and thus cannot be searched. With remote search, even those emails can be included in search results.
- Parameters
-
enabled Whether remote search is enabled
- Since
- 4.13
Definition at line 77 of file persistentsearchattribute.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 11:57:22 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.