MCPcopy Create free account
hub / github.com/alibaba/zvec / _build_search_query

Method _build_search_query

python/zvec/executor/query_executor.py:251–265  ·  view source on GitHub ↗
(
        self, ctx: QueryContext, query: Query, collection: _Collection
    )

Source from the content-addressed store, hash-verified

249 )
250
251 def _build_search_query(
252 self, ctx: QueryContext, query: Query, collection: _Collection
253 ) -> _SearchQuery:
254 query._validate()
255 search_query = self._build_base_search_query(ctx)
256 search_query.field_name = query.field_name
257 if query.param:
258 search_query.query_params = query.param
259
260 # set FTS query if provided
261 self._apply_fts(query, search_query)
262
263 if query.has_vector() or query.has_id():
264 self.set_query_vector(query, search_query, collection)
265 return search_query

Calls 6

_apply_ftsMethod · 0.95
set_query_vectorMethod · 0.95
_validateMethod · 0.80
has_idMethod · 0.80
has_vectorMethod · 0.45