# Configuring Data Sources

Data sources and query states are means of representing connections between the Discovery Framework and the MDEX Engines, as well as between queries and the MDEX Engines. This section discusses how to create and configure data sources, and outlines the default interaction model between related data sources.

- About data sources
  Every instance of a component that needs to query the MDEX Engine is backed by a particular data source. That data source, which represents a pointer to a specific MDEX Engine, is used to maintain application state for each user's session.
- Configuring data sources
  Data sources and query states are how the Discovery Framework represents connections to MDEX Engines and queries to those MDEX Engines. This section discusses how to create and configure data sources, and outlines the default interaction model between related data sources.
- Data source role-based security
  The default MDEXSecurityManager implementation supports the configuration of filters associated with Liferay roles that have been assigned to a user's login.
- Data source relationships
  This topic describes the relationship between parent and child data sources.
- Provided QueryFunction classes
  This topic defines the QueryFunction classes included in the Discovery Framework.
- Obtaining data source results
  The ENEQueryResults class from the Presentation API is used to represent results of queries.