Python OJAI Client API
ojai.store.Query.Query Class Reference

Public Member Functions

def select (self, field_paths)
 
def where (self, condition)
 
def order_by (self, field_paths, order=None)
 
def offset (self, offset)
 
def limit (self, limit)
 
def build (self)
 

Detailed Description

OJAI interface which lets users build an OJAI Query that can be executed
on an OJAI DocumentStore.

Member Function Documentation

◆ build()

def ojai.store.Query.Query.build (   self)
Builds this Query object and make it immutable.

◆ limit()

def ojai.store.Query.Query.limit (   self,
  limit 
)
Restricts the maximum number of documents returned from this query
to the specified value. Negative values are not permitted.
:param limit: maximum number of returned documents. Long or int type.
:return self for chained invocation.

◆ offset()

def ojai.store.Query.Query.offset (   self,
  offset 
)
Zero (0) based index which specifies number of Documents to skip before
returning any result. Negative values are not permitted.
Multiple invocation will overwrite the previous value.
:param offset: long or int value.
:return self for chained invocation.

◆ order_by()

def ojai.store.Query.Query.order_by (   self,
  field_paths,
  order = None 
)
Sets the sort ordering of the returned Documents to the ascending order of specified field paths.
:param field_paths: specified field paths. Type may be str or FieldPath.
:param order: order.
:return self for chained invocation.

◆ select()

def ojai.store.Query.Query.select (   self,
  field_paths 
)
Adds the list of field paths to the list of projected fields.
If not specified, the entire Document will be returned.
Multiple invocation will append new fields to the list.
:param field_paths: path to the selected fields.
:return self for chained invocation.

◆ where()

def ojai.store.Query.Query.where (   self,
  condition 
)
Sets the filtering condition for the query.
:param condition: query condition, represent as str or QueryCondition object.
:return self for chained invocation.

The documentation for this class was generated from the following file: