create_or_query method
Leave feedback
On this page
Creates a combined query that will find all the documents which will be found at least for one of the original queries.
def create_or_query(cls, left_query, right_query):
...
| Parameter | Type | Description |
|---|---|---|
| left_query | SearchQuery |
The left child query. |
| right_query | SearchQuery |
The right child query. |
Returns: A combined OR query.
from groupdocs.search import SearchQuery
word_query1 = SearchQuery.create_word_query("Einstein")
word_query2 = SearchQuery.create_word_query("relativity")
or_query = SearchQuery.create_or_query(word_query1, word_query2)
result2 = index.search(or_query)
Creates a combined query that finds documents matching at least one of the original queries.
def create_or_query(cls, queries):
...
| Parameter | Type | Description |
|---|---|---|
| queries | list[SearchQuery] |
The child queries. |
Returns: A combined OR query.
These names call create_or_query too, limited to the overloads listed.
| Alias | Accepts |
|---|---|
create_or_query_search_query |
create_or_query_search_query(left_query, right_query)create_or_query_search_query(queries) |
- class
SearchQuery
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.