- classmethod all()source
Returns a SearchableModel.Query for this kind.
- classmethod from_entity(entity)source
Wraps db.Model.from_entity() and injects SearchableEntity.
- class google.appengine.ext.search.SearchableMultiQuery(bound_queries, orderings)source
Bases: google.appengine.api.datastore.MultiQuery
A multiquery that supports Search() by searching subqueries.
- Search(*args, **kwargs)source
Add a search query, by trying to add it to all subqueries.
ParametersReturnsself for consistency with SearchableQuery.
- class google.appengine.ext.search.SearchableQuery(kind=None, filters={}, _app=None, keys_only=False, compile=True, cursor=None, namespace=None, end_cursor=None, projection=None, distinct=None, _namespace=None)source
Bases: google.appengine.api.datastore.Query
A subclass of datastore.Query that supports full text search.
Only searches over entities that were created and stored using the SearchableEntity or SearchableModel classes.
- GetFilterPredicate(*args, **kwds)source
Adds filters for the search query, then delegates to the superclass.
Mimics Query.GetFilterPredicate()’s signature. Raises BadFilterError if a filter on the index property already exists.
Returnsdatastore_query.FilterPredicate
- Search(search_query, word_delimiter_regex=None, properties=[])source
Add a search query. This may be combined with filters.
Note that keywords in the search query will be silently dropped if they are stop words or too short, ie if they wouldn’t be indexed.
Parameterssearch_query – string
Returns# this query SearchableQuery
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-04-04 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-04-04 UTC."],[[["The `google.appengine.ext.search` package provides full-text indexing and search capabilities implemented in pure Python, but it has limitations such as no ranking, exact phrase matching, or boolean operators."],["To utilize full-text search, entities must be created and saved as instances of `SearchableModel` or `SearchableEntity`, which automatically index string properties."],["You can search the full-text index using the `SearchableModel.all()` method to obtain a `SearchableModel.Query` object and then use its `search()` method, as well as `SearchableQuery` and its `search()` method."],["Custom indexes can be defined by overriding the `SearchableProperties()` method in `SearchableModel`, allowing for multiple indexes based on different property combinations, stored in the `__searchable_text_index` property."],["Using `SearchableModel` will increase the latency of save operations due to the indexing of each indexable word, with latency increasing relative to the size of the properties in an entity."]]],[]]