﻿---
title: Query data from other clusters, projects, and indices
description: Write Elastic Security detection rules that search data in other clusters or linked projects, logsdb indices, or the alerts that other rules create.
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9535/solutions/security/detect-and-alert/advanced-data-source-configuration
products:
  - Elastic Cloud Serverless
  - Elastic Documentation
  - Elastic Security
applies_to:
  - Serverless Security projects: Generally available
  - Elastic Stack: Generally available
---

# Query data from other clusters, projects, and indices
Some rules search data that needs extra setup or care, such as data in another Elasticsearch cluster or a linked Serverless project, indices that use logsdb index mode, or the alerts that other rules create. To learn how to set the index patterns, data views, and data tiers that any rule searches, refer to [Set rule data sources](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9535/solutions/security/detect-and-alert/set-rule-data-sources).
Start with the page for the data that your rule searches:
<definitions>
  <definition term="Cross-cluster search and detection rules Elastic Stack: Generally available">
    For data in other Elasticsearch clusters. Explains how to establish trust between clusters, connect to remote clusters, and reference remote indices in a rule's index patterns.
  </definition>
  <definition term="Cross-project search and detection rules Elastic Cloud Serverless: Generally available">
    For data in linked Serverless projects. Explains which projects a rule searches, where Elastic Security stores the rule's alerts, and how the alert limit applies across projects.
  </definition>
  <definition term="Query alert indices">
    For the alerts that other rules create. Explains which index to query, gives example queries, and explains how to write rules that correlate alerts, such as building block alerts from several rules on the same host.
  </definition>
  <definition term="Using logsdb index mode with Elastic Security">
    For indices that use logsdb index mode, which is on by default in Serverless. Explains how synthetic `_source` reconstruction can affect field formatting in alerts and rule queries, and what to watch for when you write rules for logsdb indices.
  </definition>
</definitions>