--- title: "Range Queries" slug: "range-queries-2" tags: ["Install and Get Started", "NDR 4.x", "Customer", "Network Security"] updated: 2026-11-17T09:22:39Z published: 2026-11-17T09:22:39Z canonical: "docs.trellix.com/range-queries-2" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.trellix.com/llms.txt > Use this file to discover all available pages before exploring further. # Range Queries Range queries let you search sessions for documents that match field values between the lower and upper bounds specified by the range query. This is useful when searching for port ranges, date and timestamp ranges, flow sizes, and flag values. Range queries can be inclusive or exclusive of the upper and lower bounds. Sorting is done lexicographically. For example, search documents whose **sourceTransportPort** field have values between 0 and 80, inclusive. Range queries are not reserved for integer or date fields. To run this range query, enter the query syntax below using the steps defined in the [Entering Queries](/network-and-platform/docs/entering-queries-2) section: ![Range Query01.png](https://cdn.us.document360.io/0d453a50-e1da-4d4a-9409-fea7959614d8/Images/Documentation/uuid-381f5802-292a-7d51-e07c-44dab37c6ecb(4).png?sv=2026-02-06&spr=https&st=2026-11-19T12%3A50%3A29Z&se=2026-11-19T13%3A50%3A29Z&sr=c&sp=r&sig=VygA%2FRBTBhl%2F4GmaZrCqLXRUZV%2FIcrBuN%2BaNLl7vCrw%3D) You can also use range queries with string fields. The search below finds all documents whose **httpHosts** are between abc.com and stackflow.org, but not including abc.com and stackflow.org. ![Grouping Search02.png](https://cdn.us.document360.io/0d453a50-e1da-4d4a-9409-fea7959614d8/Images/Documentation/uuid-65cd3527-7b68-cf25-6d9c-a1153af86c10(4).png?sv=2026-02-06&spr=https&st=2026-11-19T12%3A50%3A29Z&se=2026-11-19T13%3A50%3A29Z&sr=c&sp=r&sig=VygA%2FRBTBhl%2F4GmaZrCqLXRUZV%2FIcrBuN%2BaNLl7vCrw%3D) > [!NOTE] > Note > > Inclusive range queries are denoted by **[ ]** square brackets. > > Exclusive range queries are denoted by **{ }** curly brackets.