create_or_query method

create_or_query

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.

Example

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)

create_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.

Aliases

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)

See Also