Single/vector-less query: send a ``_SearchQuery`` to C++. Results are batch-materialized into tuples in a single C++ call (the schema is resolved inside the binding from the collection), avoiding per-doc Python/C++ crossings on the hot path.
(
self, query: _SearchQuery, collection: _Collection
)
| 132 | return self._execute_multi_query(ctx, queries, collection) |
| 133 | |
| 134 | def _execute_single_query( |
| 135 | self, query: _SearchQuery, collection: _Collection |
| 136 | ) -> DocList: |
| 137 | """Single/vector-less query: send a ``_SearchQuery`` to C++. |
| 138 | |
| 139 | Results are batch-materialized into tuples in a single C++ call |
| 140 | (the schema is resolved inside the binding from the collection), |
| 141 | avoiding per-doc Python/C++ crossings on the hot path. |
| 142 | """ |
| 143 | tuples = collection.Query(query) |
| 144 | return [Doc._from_tuple(t) if t is not None else None for t in tuples] |
| 145 | |
| 146 | def _execute_multi_query( |
| 147 | self, ctx: QueryContext, queries: list[_SearchQuery], collection: _Collection |