(self,
field_name, # type: str
vector, # type: Union[List[float], str]
num_candidates=None, # type: Optional[int]
boost=None, # type: Optional[float]
prefilter=None, # type: Optional[SearchQuery]
)
| 47 | """ # noqa: E501 |
| 48 | |
| 49 | def __init__(self, |
| 50 | field_name, # type: str |
| 51 | vector, # type: Union[List[float], str] |
| 52 | num_candidates=None, # type: Optional[int] |
| 53 | boost=None, # type: Optional[float] |
| 54 | prefilter=None, # type: Optional[SearchQuery] |
| 55 | ): |
| 56 | if is_null_or_empty(field_name): |
| 57 | raise InvalidArgumentException('Must provide a field name.') |
| 58 | self._field_name = field_name |
| 59 | self._vector = None |
| 60 | self._vector_base64 = None |
| 61 | self._validate_and_set_vector(vector) |
| 62 | self._num_candidates = self._boost = self._prefilter = None |
| 63 | if num_candidates is not None: |
| 64 | self.num_candidates = num_candidates |
| 65 | if boost is not None: |
| 66 | self.boost = boost |
| 67 | if prefilter is not None: |
| 68 | self.prefilter = prefilter |
| 69 | |
| 70 | @property |
| 71 | def boost(self) -> Optional[float]: |
nothing calls this directly
no test coverage detected