now.executor.gateway.bff.app.v1.routers.search module#

async now.executor.gateway.bff.app.v1.routers.search.search(data=Body(PydanticUndefined))[source]#
now.executor.gateway.bff.app.v1.routers.search.get_score_calculation(data, field_names_to_dataclass_fields)[source]#

Extract and process the score calculation from the request model to the format expected by the indexer. This includes converting the field names to the dataclass field names, for the query and for the index fields.

Parameters
  • data (SearchRequestModel) – the request model

  • field_names_to_dataclass_fields (Dict[str, str]) – a mapping from the field names in the request model to the field names in the dataclass

Return type

List[List[Any]]

Returns

the score calculation in the format expected by the indexer. Example: [[‘query_text’, ‘my_product_image’, ‘encoderclip’, 1], [‘query_text’, ‘my_product_text’, ‘bm25’, 1]]