> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# filter_by_box

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/filter_by_box.rs#L42-L65)
pub async fn [filter\_by\_box](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/filter-by-box.md#method.filter_by_box)( \&self, table\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), view\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), x\_column\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), min\_x: [f64](https://doc.rust-lang.org/1.98.1/std/primitive.f64.html), max\_x: [f64](https://doc.rust-lang.org/1.98.1/std/primitive.f64.html), y\_column\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), min\_y: [f64](https://doc.rust-lang.org/1.98.1/std/primitive.f64.html), max\_y: [f64](https://doc.rust-lang.org/1.98.1/std/primitive.f64.html), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[FilterByBoxResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByBoxResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Filter a dataset for records within a rectangle’s boundaryCalculates how many objects within the given table lie in a rectangular box. The operation is synchronous, meaning that a response will not be returned until all the objects are fully available. The response payload provides the count of the resulting set. A new resultant set which satisfies the input NAI restriction specification is also created when a `view_name` is passed in as part of the input payload.

##### Arguments

<ul>
  <li>`table_name` - Name of the table on which the bounding box operation will be performed, in \[schema\_name.]table\_name format, using standard name resolution rules. Must be an existing table.</li>
  <li>`view_name` - If provided, then this will be the name of the view containing the results, in \[schema\_name.]view\_name format, using standard name resolution rules and meeting table naming criteria. Must not be an already existing table or view.</li>
  <li>`x_column_name` - Name of the column on which to perform the bounding box query. Must be a valid numeric column.</li>
  <li>`min_x` - Lower bound for the column chosen by `x_column_name`. Must be less than or equal to `max_x`.</li>
  <li>`max_x` - Upper bound for `x_column_name`. Must be greater than or equal to `min_x`.</li>
  <li>`y_column_name` - Name of a column on which to perform the bounding box query. Must be a valid numeric column.</li>
  <li>`min_y` - Lower bound for `y_column_name`. Must be less than or equal to `max_y`.</li>
  <li>`max_y` - Upper bound for `y_column_name`. Must be greater than or equal to `min_y`.</li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/filter_by_box.rs#L99-L129)
pub async fn [filter\_by\_box\_with\_opts](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/filter-by-box.md#method.filter_by_box_with_opts)( \&self, table\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), view\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), x\_column\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), min\_x: [f64](https://doc.rust-lang.org/1.98.1/std/primitive.f64.html), max\_x: [f64](https://doc.rust-lang.org/1.98.1/std/primitive.f64.html), y\_column\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), min\_y: [f64](https://doc.rust-lang.org/1.98.1/std/primitive.f64.html), max\_y: [f64](https://doc.rust-lang.org/1.98.1/std/primitive.f64.html), options: [FilterByBoxRequestOptions](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByBoxRequestOptions.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[FilterByBoxResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByBoxResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Filter a dataset for records within a rectangle’s boundaryCalculates how many objects within the given table lie in a rectangular box. The operation is synchronous, meaning that a response will not be returned until all the objects are fully available. The response payload provides the count of the resulting set. A new resultant set which satisfies the input NAI restriction specification is also created when a `view_name` is passed in as part of the input payload.

##### Arguments

<ul>
  <li>`table_name` - Name of the table on which the bounding box operation will be performed, in \[schema\_name.]table\_name format, using standard name resolution rules. Must be an existing table.</li>
  <li>`view_name` - If provided, then this will be the name of the view containing the results, in \[schema\_name.]view\_name format, using standard name resolution rules and meeting table naming criteria. Must not be an already existing table or view.</li>
  <li>`x_column_name` - Name of the column on which to perform the bounding box query. Must be a valid numeric column.</li>
  <li>`min_x` - Lower bound for the column chosen by `x_column_name`. Must be less than or equal to `max_x`.</li>
  <li>`max_x` - Upper bound for `x_column_name`. Must be greater than or equal to `min_x`.</li>
  <li>`y_column_name` - Name of a column on which to perform the bounding box query. Must be a valid numeric column.</li>
  <li>`min_y` - Lower bound for `y_column_name`. Must be less than or equal to `max_y`.</li>
  <li>`max_y` - Upper bound for `y_column_name`. Must be greater than or equal to `min_y`.</li>
  <li>`options` - The optional parameters; any left unset take the server’s defaults.</li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/filter_by_box.rs#L132-L143)
pub async fn [filter\_by\_box\_raw](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/filter-by-box.md#method.filter_by_box_raw)( \&self, request: &[FilterByBoxRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByBoxRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[FilterByBoxResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByBoxResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`FilterByBoxRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByBoxRequest) to the `/filter/bybox` endpoint.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/filter_by_box.rs#L147-L159)
pub async fn [filter\_by\_box\_from\_url](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/filter-by-box.md#method.filter_by_box_from_url)( \&self, url: &[str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html), request: &[FilterByBoxRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByBoxRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[FilterByBoxResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByBoxResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`FilterByBoxRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByBoxRequest) to a specific worker URL, bypassing HA head-node selection. Used for multi-head access.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.