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

# Query Profiles

export const LwTemplate = ({title = "Key questions to get you started", icon = "sparkles", cta = "Powered by Agent Studio", linkHref = "https://lucidworks.com/demo/?utm_source=docs&utm_medium=referral&utm_campaign=docs_cta_ai"}) => {
  const [isLoaded, setIsLoaded] = useState(false);
  useEffect(() => {
    const timer = setTimeout(() => {
      setIsLoaded(true);
    }, 500);
    return () => clearTimeout(timer);
  }, []);
  return <div className="lw-template-container">
      <Card title={title} icon={icon}>
        {isLoaded && <span dangerouslySetInnerHTML={{
    __html: `<lw-template id="a029c1a9-28be-427e-b0e1-5d918920246a"></lw-template
            >`
  }} />}
        <Link href={linkHref} className="agent-studio-link text-left text-gray-600 gap-2 dark:text-gray-400 text-sm font-medium flex flex-row items-center hover:text-primary dark:hover:text-primary-light group-hover:text-primary group-hover:dark:text-primary-light">Powered by Lucidworks Agent Studio</Link>
      </Card>
    </div>;
};

[localhost link]: http://localhost:3000/docs/4/fusion-server/concepts/querying/pipelines/query-profiles

[mintlify link]: https://doc.lucidworks.com/docs/4/fusion-server/concepts/querying/pipelines/query-profiles

[old doc.lw link]: https://doc.lucidworks.com/fusion/5.9/174

Query profiles let you consistently point your search application at a static endpoint, but give you the flexibility to change the actual query pipeline being used (and optionally, the collection and/or configuration parameters for the query pipeline).

For example, an e-commerce site might want to create a query pipeline to support a month-long promotion. After the query pipeline is configured, it can be easily enabled by changing the query profile in use by the front-end application to use the new pipeline.

To run a query through a query profile, use the REST API as described below. For CRUD operations, you can use either the REST API or the Fusion UI.

<LwTemplate />

## Rules Simulator query profile

The [Rules Simulator](/docs/4/fusion-ai/concepts/query-rewriting/simulator) allows product owners to experiment with rules and other query rewrites in the `_query_rewrite_staging` collection before deploying them to the `_query_rewrite` collection.

Each app has a `_rules_simulator` query profile, configured to use the `_query_rewrite_staging` collection for query rewrites instead of the `_query_rewrite` collection. This profile is created automatically whenever a new app is created.

## Query profiles in the REST API

* [Query Profiles API](/docs/4/fusion-server/reference/api/query/query-profiles-api) (`/query-profiles`)\
  Create, read, update, and delete query profiles.
* [Query API](/docs/4/fusion-server/reference/api/query/query-api) (`/query`)\
  Run a query through a query profile by specifying the profile ID and appending the request with a [Solr query string](/docs/4/fusion-server/reference/query-language-cheat-sheet), as in `/api/query/<id>?<solrQuery>`.

## Query profiles in the UI

Query profiles are configured at **Querying** > **Query Profiles**.

<img src="https://mintcdn.com/lucidworks/l9y7VqRhZkN9hmR0/assets/images/4.0/query-profile-menu.png?fit=max&auto=format&n=l9y7VqRhZkN9hmR0&q=85&s=a44e91296de90413e5d172e873e05f8f" alt="Query Profiles" width="690" height="555" data-path="assets/images/4.0/query-profile-menu.png" />

## Learn more

<Accordion title="Edit Rules in the Rules Simulator">
  You can edit any rule in the list of triggered rules, including disabling it, by clicking the Edit icon next to the rule.

  <img src="https://mintcdn.com/lucidworks/vupE2UCZdg04NdXx/assets/images/4.2/rules-edit-rule.png?fit=max&auto=format&n=vupE2UCZdg04NdXx&q=85&s=580b36080280ed645f970ce5a6f8c310" alt="Edit Rule window" width="2562" height="1284" data-path="assets/images/4.2/rules-edit-rule.png" />

  De-select "Enabled" in the Edit Rule window to turn off this rule.

  <Tip>
    Only rules triggered by the current query are available to edit in the Simulator.
  </Tip>
</Accordion>
