---
title: Search Data
sidebar:
  order: 46
---
This section illustrates how to search [ROS](https://www.ros.org/blog/getting-started/) logs using [RoboQL](/docs/roboql/overview), Roboto's query language. RoboQL enables filtering ROS log files based on metadata, tags, and statistics derived from topic data.

For the examples below, we uploaded a couple of hundred `.bag` files from the [nuScenes](https://www.nuscenes.org/nuscenes) dataset into an example Roboto account. The data includes logs from various driving scenes in Singapore and Boston.

## Query with metadata and tags

Every dataset in this example has automatically been tagged with the city where the data was collected and the `sys_version` that was used to record the data. Refer to [creating your own action](/docs/user-guides/process-data-actions/creating-your-own-action) to learn how to automatically tag your own data.

Using RoboQL, you can query files based on metadata and tags. To highlight this, we will locate all drives with `sys_version=1` that were recorded in `boston`:

1. First, we navigate to the [Search](https://app.roboto.ai/search) page in Roboto.

2. We leave Datasets as the query target on the left side of the search bar, and then select the RoboQL toggle on the right side:

   ![RoboQL search interface](/docs/blume-assets/content/docs/_static/ros_search_interface.png)

3. We can then enter the following query in the search box:

   ```bash
   metadata.sys_version = 1 AND tags CONTAINS "boston"
   ```

4. Review the query results:

   ![Query results](/docs/blume-assets/content/docs/_static/ros_show_results.png)

## Query with topic data

In addition to metadata and tags, RoboQL enables you to query logs based on statistics derived from topic data. For example, you can search for drive logs within a specific speed range or at a particular battery level.

By default, Roboto calculates the following statistics for each message path in a topic: `min`, `max`, `mean`, and `median`. For boolean fields within message paths, Roboto also calculates `true_count` (the number of `true` values) and `false_count` (the number of `false` values).

5. For example, to search for all logs in 2024 where the maximum vehicle speed was above `20 mph` and the average battery level was above `50%`, we can use the following query:

   ```bash
   topics[0].msgpaths[/vehicle_monitor/vehicle_speed.data].max > 20 AND
   topics[1].msgpaths[/vehicle_monitor/battery_level.data].mean > 50 AND
   created > "2024-01-01"
   ```

6. Review the query results:

   ![Query results](/docs/blume-assets/content/docs/_static/ros_show_results_2.png)
