<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tflite-support/blob/v0.4.4/tensorflow_lite_support/python/task/processor/proto/search_options.proto) |

Options for search processor.

    tflite_support.task.processor.SearchOptions(
        index_file_name: Optional[str] = None,
        index_file_content: Optional[bytes] = None,
        max_results: Optional[int] = 5
    )

The index file to search into. Mandatory only if the index is not attached
to the output tensor metadata as an AssociatedFile with type SCANN_INDEX_FILE.
The index file can be specified by one of the following two ways:

(1) file contents loaded in `index_file_content`.
(2) file path in `index_file_name`.

If more than one field of these fields is provided, they are used in this
precedence order.

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `index_file_name` | Path to the index. |
| `index_file_content` | The index file contents as bytes. |
| `max_results` | Maximum number of nearest neighbor results to return. |

<br />

## Methods

### `create_from_pb2`

[View source](https://github.com/tensorflow/tflite-support/blob/v0.4.4/tensorflow_lite_support/python/task/processor/proto/search_options.proto)

    @classmethod
    create_from_pb2(
        pb2_obj: _SearchOptionsProto
    ) -> 'SearchOptions'

Creates a `SearchOptionsProto` object from the given protobuf object.

### `to_pb2`

[View source](https://github.com/tensorflow/tflite-support/blob/v0.4.4/tensorflow_lite_support/python/task/processor/proto/search_options.proto)

    to_pb2() -> _SearchOptionsProto

Generates a protobuf object to pass to the C++ layer.

### `__eq__`

[View source](https://github.com/tensorflow/tflite-support/blob/v0.4.4/tensorflow_lite_support/python/task/processor/proto/search_options.proto)

    __eq__(
        other: Any
    ) -> bool

Checks if this object is equal to the given object.

<br />

<br />

<br />

| Args ||
|---|---|
| `other` | The object to be compared with. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| True if the objects are equal. ||

<br />

<br />

<br />

<br />

| ## Class Variables ||
|---|---|
| index_file_content | `None` |
| index_file_name | `None` |
| max_results | `5` |

<br />