> ## 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.

# Items-For-Item Recommendations

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/5/fusion/getting-data-out/query-enhancement/recommendations/items-for-item

[mintlify link]: https://doc.lucidworks.com/docs/5/fusion/getting-data-out/query-enhancement/recommendations/items-for-item

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

Items-for-item recommendations present items that are similar to a specified item. For example, when the user is viewing a BMX bicycle, Fusion can recommend other BMX bicycles. Similarity can be based on different criteria, such as click patterns, people who bought this also bought that, percentage match of document tags, and so on.

<LwTemplate />

## Collaborative items-for-item recommendations

If you have enabled signals and recommendations for a collection, then the default `COLLECTION_NAME_bpr_item_recs`, a [BPR Recommender](/docs/5/fusion/reference/config-ref/jobs/bpr-recommender) job is already created and configured to produce items-for-item recommendations (as well as [items-for-user recommendations](/docs/5/fusion/getting-data-out/query-enhancement/recommendations/items-for-user)).

This is the recommended job type, and produces better results with a short runtime. <a href="/assets/attachments/pipelines/APPName_item_item_rec_pipelines_bpr.json" download>Download the APPName\_item\_item\_rec\_pipelines\_bpr.json file</a> and **Migrate Fusion Objects** to create the query pipeline that consumes this job’s output. See **Fetch Items-for-Item Recommendations (Collaborative/BPR Method)** for details.

<AccordionGroup>
  <Accordion title="Migrate Fusion Objects">
    You can use the Fusion UI and the [Objects API](/api-reference/objects/get-objects-service-status) to migrate collections and related objects, including your searchable data, configuration data, pipelines, aggregations, and other objects on which your collections depend. You can also migrate entire apps.

    <Check>To upgrade from one Fusion version to a 5.x version, see Fusion 5 Upgrades to migrate objects.</Check>

    You might need to migrate objects in the following circumstances:

    * When migrating data from development environments into testing and production environments
    * To back up data, so you can restore it after an incident of data loss
    * When the migrator script was not able to migrate an object automatically

    <Warning>When you export and import objects to migrate them, make sure you that any data gets to where it is going before deleting the sources.</Warning>

    ## Migration approaches

    Several approaches are available for migrating Fusion objects. This table summarizes the approaches.

    |                                   | Export an app              | Import an app                                                      | Export an object           | Import an object          | Add an object to an app |
    | --------------------------------- | -------------------------- | ------------------------------------------------------------------ | -------------------------- | ------------------------- | ----------------------- |
    | **Fusion UI**                     | App configuration          | Launcher<br /> (entire app) App configuration<br /> (combine apps) | -                          | -                         | Object Explorer         |
    | **Objects API**<br /> (endpoints) | GET from `export` endpoint | POST to `import` endpoint                                          | GET from `export` endpoint | POST to `import` endpoint | -                       |

    For more information about using the Objects API to export and import objects, see [Objects API](/api-reference/objects/get-objects-service-status).

    The remainder of this topic describes approaches in the Fusion UI.

    Use the parts of the Fusion UI indicated in the table to export and import apps and specific objects. Exporting creates a zip file. To import, you select a data file and possibly a variable file.

    The approach with Object Explorer differs. With Object Explorer, you can add objects from other apps (or that are not linked to any apps) to the currently open app.

    ## Export an app with the Fusion UI

    **How to export an app with the Fusion UI**

    1. Navigate to the launcher.
    2. Hover over the app you want to export and click the Configure icon:
           <img src="https://mintcdn.com/lucidworks/L5PMnIeZ03zhv8Ti/assets/images/5.6/launcher-app-config-hover-56.png?fit=max&auto=format&n=L5PMnIeZ03zhv8Ti&q=85&s=8ae921d898899048020c96681719b4ee" alt="App config button" width="3138" height="1134" data-path="assets/images/5.6/launcher-app-config-hover-56.png" />
    3. In the app config window, click **Export app to zip**:
           <img style={{ width: "300px" }} src="https://mintcdn.com/lucidworks/L5PMnIeZ03zhv8Ti/assets/images/5.6/launcher-export-app-56.png?fit=max&auto=format&n=L5PMnIeZ03zhv8Ti&q=85&s=198aa7f16fddd9adc758115e7ec132c2" width="869" height="989" data-path="assets/images/5.6/launcher-export-app-56.png" />

    See import for information to import the downloaded zip file into other instances of Fusion 5.x.

    ## Import an app with the Fusion UI

    **How to import an app with the Fusion UI**

    1. Navigate to the launcher.
    2. Click **Import app**.
           <img style={{ width: "300px" }} src="https://mintcdn.com/lucidworks/zH_ln2rWO5G9pvTA/assets/images/5.0/launcher-import-app.png?fit=max&auto=format&n=zH_ln2rWO5G9pvTA&q=85&s=c093d9e28cc5ab76f2c4a7323d741afa" width="591" height="578" data-path="assets/images/5.0/launcher-import-app.png" />
    3. Under **Data File**, click **Choose File** and select the zip file containing the app you want to import.
    4. If your app has [usernames and passwords](/api-reference/objects/list-imported-variables) in a separate file, select it under **Variables File**.
       If the Variables File is needed, it *must* be a separate file that is not in a .zip file. It is a .json map of variables to values. The following is an example:
       ```json theme={"dark"}
       {
       "secret.dataSources.Inventory_BR_S3_DS.password":"SOMETHING",
       "secret.dataSources.LLM_A_BR_S3_DS.password":"FmJSaDE9Tj5REDACTED",
       "secret.dataSources.LLM_BR_Inventory_S3_DS.password":"FmJSaDE9Tj5GzIVvethAC4Huh",
       "secret.dataSources.LLM_BR_Load_S3_DS.password":"FmJSaDE9Tj5GzIVvethAC4"
       }
       ```
    5. You can sometimes edit parameter values to use the new values in the imported app. If this is the case, Fusion displays a dialog box that lets you edit the parameter values.
           <img src="https://mintcdn.com/lucidworks/de_1M1m_4TTyJqw0/assets/images/5.0/import-app-edit-parameters.png?fit=max&auto=format&n=de_1M1m_4TTyJqw0&q=85&s=2211f3a81b3394a7959b582d59afa2b9" alt="Edit parameter values" width="1658" height="1152" data-path="assets/images/5.0/import-app-edit-parameters.png" />
       Make desired changes, and then click **Import**.

    ## Copy an app

    To copy an app from one deployment to a different one, [export the app](#export-an-app-with-the-fusion-ui) on the source deployment, and then [import the app](#import-an-app-with-the-fusion-ui) on the target deployment.

    ## Import objects into an app

    You can import objects into the currently open app.

    **How to import objects into an open app**

    1. In the Fusion launcher, click the app into which you want to import objects.
       The Fusion workspace appears.
    2. Click **System > Import Fusion Objects**.
       The Import Fusion Objects window opens.
           <img src="https://mintcdn.com/lucidworks/NgNm7Bp5nEBDIA7H/assets/images/4.0/import-objects.png?fit=max&auto=format&n=NgNm7Bp5nEBDIA7H&q=85&s=04697d36b39bd2229b87bedfee422a09" alt="Import Objects Window" width="2880" height="1508" data-path="assets/images/4.0/import-objects.png" />
    3. Select the data file from your local filesystem.
       If you are importing [usernames and passwords](/api-reference/objects/import-objects) in a separate file, select it under **Variables File**.
    4. Click **Import**.
       If there are conflicts, Fusion prompts you to specify an import policy:
           <img src="https://mintcdn.com/lucidworks/NgNm7Bp5nEBDIA7H/assets/images/4.0/import-conflicts.png?fit=max&auto=format&n=NgNm7Bp5nEBDIA7H&q=85&s=53b711be62ea740fb033b6dbc96a29a6" alt="Import Conflicts" width="2880" height="1508" data-path="assets/images/4.0/import-conflicts.png" />
       * Click **Overwrite** to overwrite the objects on the target system with the ones in the import file.
       * Click **Merge** to skip all conflicting objects and import only the non-conflicting objects.
       * Click **Start Over** to abort the import.
         Fusion confirms that the import was successful:
             <img src="https://mintcdn.com/lucidworks/NgNm7Bp5nEBDIA7H/assets/images/4.0/import-objects-success.png?fit=max&auto=format&n=NgNm7Bp5nEBDIA7H&q=85&s=e2416d872ac6a74f2d40eaa4adbde56f" alt="Successful Import" width="2880" height="1508" data-path="assets/images/4.0/import-objects-success.png" />
    5. Click **Close** to close the Import Fusion Objects window.

    ## Add an object to an app

    You can add objects present in other apps (or in no apps) to the open app. Some objects are linked to other apps. You can also add those directly to an app.

    * **Add an object to an app** – While in the Fusion workspace for the app to which you want to add an object, open Object Explorer and click **In Any App**. Search for or browse to the object you want to add. Hover over the object, click the App <img className="inline-image" alt="App" src="https://mintcdn.com/lucidworks/5yWZ-KtZuBe4Y_Fg/assets/images/4.0/icons/oe-app-menu.png?fit=max&auto=format&n=5yWZ-KtZuBe4Y_Fg&q=85&s=1e9322222ea76f70c278fb9c2a04ce9f" width="40" height="42" data-path="assets/images/4.0/icons/oe-app-menu.png" /> icon, and then click **Add to this app**.

          <img src="https://mintcdn.com/lucidworks/l9y7VqRhZkN9hmR0/assets/images/4.0/object-explorer-add-to-app.png?fit=max&auto=format&n=l9y7VqRhZkN9hmR0&q=85&s=472088e9361aa1bc278ad7da50e9bbdf" alt="Add to this app" width="2560" height="938" data-path="assets/images/4.0/object-explorer-add-to-app.png" />
    * **Add an object to an app directly** – In cases when an object is linked to an app, but is not linked directly to the app (it is linked via some dependency), you can add the object to an app directly.

      While in the Fusion workspace for the app to which you want to add an object directly, open Object Explorer and click **In Any App**. Search for or browse to the object you want to add. Hover over the object, click the App <img className="inline-image" alt="App" src="https://mintcdn.com/lucidworks/5yWZ-KtZuBe4Y_Fg/assets/images/4.0/icons/oe-app-menu.png?fit=max&auto=format&n=5yWZ-KtZuBe4Y_Fg&q=85&s=1e9322222ea76f70c278fb9c2a04ce9f" width="40" height="42" data-path="assets/images/4.0/icons/oe-app-menu.png" /> icon, and then click **Add to this app directly**.

          <img src="https://mintcdn.com/lucidworks/l9y7VqRhZkN9hmR0/assets/images/4.0/object-explorer-add-directly-to-app.png?fit=max&auto=format&n=l9y7VqRhZkN9hmR0&q=85&s=af54840e096bbb4e6814c7eb5960d492" alt="Add to this app directly" width="2560" height="861" data-path="assets/images/4.0/object-explorer-add-directly-to-app.png" />
  </Accordion>

  <Accordion title="Fetch Items-for-Item Recommendations (Collaborative/BPR Method)">
    In Fusion, you can download and import a query pipeline that works out of the box with the default [BPR Recommender](/docs/5/fusion/reference/config-ref/jobs/bpr-recommender) job.

    There are two separate pipelines attached below which work in different ways to query and return recommendations.

    **Query for recommendations only**

    1. <a href="/assets/attachments/pipelines/APPName_item_item_rec_pipelines_bpr.json" download>Download the `APPName_item_item_rec_pipelines_bpr.json` file</a>.
    2. Rename the file to replace `APPName` with the name of your Fusion app, such as `ProductCatalog_item_item_rec_pipelines_bpr.json`.
    3. Open the JSON file, replace all instances of `APPName` with the name of your Fusion app, such as `ProductCatalog`, and save it.
    4. Import the JSON file into your Fusion instance using the Query Pipelines REST API:
       ```
       curl -u USERNAME:PASSWORD <fusion_proxy>/api/query-pipelines -XPOST -H 'content-type:application/json' -d@<path/to/filename.json>
       ```
    5. In the Fusion UI, navigate to **Query** > **Query Pipelines** to verify that the new pipeline is available.

       <Note>   This pipeline should be used to query the collection where the recommendations are stored. It makes a query against the `itemId` field and only returns the recommended `itemId` values. To get the actual items, you need to make a second query to the respective catalog collection with the returned `itemId` values.</Note>

    No additional configuration is needed to use this pipeline with the default BPR job configuration.

    **Boost recommended products from catalog**

    1. <a href="/assets/attachments/pipelines/APPName_items_for_item_bpr_boost.json" download>Download the `APPName_items_for_item_bpr_boost.json` file</a>
    2. Rename the file to replace `APPName` with the name of your Fusion app, such as `ProductCatalog_item_item_rec_pipelines_bpr.json`.
    3. Open the JSON file, replace all instances of `APPName` with the name of your Fusion app, such as `ProductCatalog`.
    4. Fill in the `collection` name field in the first `Recommend Items for Item` stage and save the file.
       5\. Import the JSON file into your Fusion instance using the Query Pipelines REST API:
       ```
       curl -u USERNAME:PASSWORD <fusion_proxy>/api/query-pipelines -XPOST -H 'content-type:application/json' -d@<path/to/filename.json>
       ```
    5. In the Fusion UI, navigate to **Query** > **Query Pipelines** to verify that the new pipeline is available.

    <Note>This pipeline queries the recommendations collection and then makes a subsequent query to the actual catalog collection boosting the recommended items and returning the actual items from the catalog. This pipeline will therefore also return recommendations even if none were generated/available.</Note>

    <Note>This pipeline expects a request parameter called `id=<itemId>` to be appended to the request in order to work. An example query URL to this pipeline would look like `https://example-recs-fusion.com/api/query-pipelines/APPName_items_for_item_bpr_boost/collections/catalog/select?q=**:**&id=SomeItemId`</Note>

    <Tip>If the pipeline does not appear in the **Query Pipelines** panel, you may need to attach it to your app like this:  Go to **System** > **Object Explorer**, click the **In No Apps** filter, hover over the pipeline, click the <img className="inline-image" alt="oe-app-menu" src="https://mintcdn.com/lucidworks/5yWZ-KtZuBe4Y_Fg/assets/images/4.0/icons/oe-app-menu.png?fit=max&auto=format&n=5yWZ-KtZuBe4Y_Fg&q=85&s=1e9322222ea76f70c278fb9c2a04ce9f" width="40" height="42" data-path="assets/images/4.0/icons/oe-app-menu.png" /> icon, and select **Add to this app**.</Tip>

    No additional configuration is needed to use this pipeline with the default BPR job configuration.

    **See also**

    * [Items-For-Item Recommendations](/docs/5/fusion/getting-data-out/query-enhancement/recommendations/items-for-item)
    * [Getting Started with Recommendations and Boosting](/docs/5/fusion/getting-data-out/query-enhancement/recommendations/getting-started)
  </Accordion>
</AccordionGroup>

<Frame caption="BPR collaborative recommendations dataflow">
  <img src="https://mintcdn.com/lucidworks/S4K1ej9-5L4WZcZ9/assets/images/5.2/bpr-dataflow-diagram.png?fit=max&auto=format&n=S4K1ej9-5L4WZcZ9&q=85&s=6fa614bb8ef4601b6b45c1b3dae5dc9a" alt="BPR dataflow" width="841" height="221" data-path="assets/images/5.2/bpr-dataflow-diagram.png" />
</Frame>

<Tip>
  If you want to use different parameters for items-for-item recommendations and [items-for-user recommendations](/docs/5/fusion/getting-data-out/query-enhancement/recommendations/items-for-user), simply create separate jobs for each, where one job configuration includes an output collection for items-for-item recommendations only and the other includes an output collection for items-for-user recommendations only.
</Tip>

## Content-based items-for-item recommendations

The [Content-Based Recommender](/docs/5/fusion/reference/config-ref/jobs/content-based-recommender) job computes item similarities based on their content, such as product descriptions. This is a useful option when you do not have enough signals for accurate results using the collaborative method described above. <a href="/assets/attachments/pipelines/APPName_item_item_rec_pipelines_content.json" download>Download the APPName\_item\_item\_rec\_pipelines\_content.json file</a> and **Migrate Fusion Objects** to create the query pipeline that consumes this job’s output.

<Accordion title="Migrate Fusion Objects">
  You can use the Fusion UI and the [Objects API](/api-reference/objects/get-objects-service-status) to migrate collections and related objects, including your searchable data, configuration data, pipelines, aggregations, and other objects on which your collections depend. You can also migrate entire apps.

  <Check>To upgrade from one Fusion version to a 5.x version, see Fusion 5 Upgrades to migrate objects.</Check>

  You might need to migrate objects in the following circumstances:

  * When migrating data from development environments into testing and production environments
  * To back up data, so you can restore it after an incident of data loss
  * When the migrator script was not able to migrate an object automatically

  <Warning>When you export and import objects to migrate them, make sure you that any data gets to where it is going before deleting the sources.</Warning>

  ## Migration approaches

  Several approaches are available for migrating Fusion objects. This table summarizes the approaches.

  |                                   | Export an app              | Import an app                                                      | Export an object           | Import an object          | Add an object to an app |
  | --------------------------------- | -------------------------- | ------------------------------------------------------------------ | -------------------------- | ------------------------- | ----------------------- |
  | **Fusion UI**                     | App configuration          | Launcher<br /> (entire app) App configuration<br /> (combine apps) | -                          | -                         | Object Explorer         |
  | **Objects API**<br /> (endpoints) | GET from `export` endpoint | POST to `import` endpoint                                          | GET from `export` endpoint | POST to `import` endpoint | -                       |

  For more information about using the Objects API to export and import objects, see [Objects API](/api-reference/objects/get-objects-service-status).

  The remainder of this topic describes approaches in the Fusion UI.

  Use the parts of the Fusion UI indicated in the table to export and import apps and specific objects. Exporting creates a zip file. To import, you select a data file and possibly a variable file.

  The approach with Object Explorer differs. With Object Explorer, you can add objects from other apps (or that are not linked to any apps) to the currently open app.

  ## Export an app with the Fusion UI

  **How to export an app with the Fusion UI**

  1. Navigate to the launcher.
  2. Hover over the app you want to export and click the Configure icon:
       <img src="https://mintcdn.com/lucidworks/L5PMnIeZ03zhv8Ti/assets/images/5.6/launcher-app-config-hover-56.png?fit=max&auto=format&n=L5PMnIeZ03zhv8Ti&q=85&s=8ae921d898899048020c96681719b4ee" alt="App config button" width="3138" height="1134" data-path="assets/images/5.6/launcher-app-config-hover-56.png" />
  3. In the app config window, click **Export app to zip**:
       <img style={{ width: "300px" }} src="https://mintcdn.com/lucidworks/L5PMnIeZ03zhv8Ti/assets/images/5.6/launcher-export-app-56.png?fit=max&auto=format&n=L5PMnIeZ03zhv8Ti&q=85&s=198aa7f16fddd9adc758115e7ec132c2" width="869" height="989" data-path="assets/images/5.6/launcher-export-app-56.png" />

  See import for information to import the downloaded zip file into other instances of Fusion 5.x.

  ## Import an app with the Fusion UI

  **How to import an app with the Fusion UI**

  1. Navigate to the launcher.
  2. Click **Import app**.
       <img style={{ width: "300px" }} src="https://mintcdn.com/lucidworks/zH_ln2rWO5G9pvTA/assets/images/5.0/launcher-import-app.png?fit=max&auto=format&n=zH_ln2rWO5G9pvTA&q=85&s=c093d9e28cc5ab76f2c4a7323d741afa" width="591" height="578" data-path="assets/images/5.0/launcher-import-app.png" />
  3. Under **Data File**, click **Choose File** and select the zip file containing the app you want to import.
  4. If your app has [usernames and passwords](/api-reference/objects/list-imported-variables) in a separate file, select it under **Variables File**.
     If the Variables File is needed, it *must* be a separate file that is not in a .zip file. It is a .json map of variables to values. The following is an example:
     ```json theme={"dark"}
     {
     "secret.dataSources.Inventory_BR_S3_DS.password":"SOMETHING",
     "secret.dataSources.LLM_A_BR_S3_DS.password":"FmJSaDE9Tj5REDACTED",
     "secret.dataSources.LLM_BR_Inventory_S3_DS.password":"FmJSaDE9Tj5GzIVvethAC4Huh",
     "secret.dataSources.LLM_BR_Load_S3_DS.password":"FmJSaDE9Tj5GzIVvethAC4"
     }
     ```
  5. You can sometimes edit parameter values to use the new values in the imported app. If this is the case, Fusion displays a dialog box that lets you edit the parameter values.
       <img src="https://mintcdn.com/lucidworks/de_1M1m_4TTyJqw0/assets/images/5.0/import-app-edit-parameters.png?fit=max&auto=format&n=de_1M1m_4TTyJqw0&q=85&s=2211f3a81b3394a7959b582d59afa2b9" alt="Edit parameter values" width="1658" height="1152" data-path="assets/images/5.0/import-app-edit-parameters.png" />
     Make desired changes, and then click **Import**.

  ## Copy an app

  To copy an app from one deployment to a different one, [export the app](#export-an-app-with-the-fusion-ui) on the source deployment, and then [import the app](#import-an-app-with-the-fusion-ui) on the target deployment.

  ## Import objects into an app

  You can import objects into the currently open app.

  **How to import objects into an open app**

  1. In the Fusion launcher, click the app into which you want to import objects.
     The Fusion workspace appears.
  2. Click **System > Import Fusion Objects**.
     The Import Fusion Objects window opens.
       <img src="https://mintcdn.com/lucidworks/NgNm7Bp5nEBDIA7H/assets/images/4.0/import-objects.png?fit=max&auto=format&n=NgNm7Bp5nEBDIA7H&q=85&s=04697d36b39bd2229b87bedfee422a09" alt="Import Objects Window" width="2880" height="1508" data-path="assets/images/4.0/import-objects.png" />
  3. Select the data file from your local filesystem.
     If you are importing [usernames and passwords](/api-reference/objects/import-objects) in a separate file, select it under **Variables File**.
  4. Click **Import**.
     If there are conflicts, Fusion prompts you to specify an import policy:
       <img src="https://mintcdn.com/lucidworks/NgNm7Bp5nEBDIA7H/assets/images/4.0/import-conflicts.png?fit=max&auto=format&n=NgNm7Bp5nEBDIA7H&q=85&s=53b711be62ea740fb033b6dbc96a29a6" alt="Import Conflicts" width="2880" height="1508" data-path="assets/images/4.0/import-conflicts.png" />
     * Click **Overwrite** to overwrite the objects on the target system with the ones in the import file.
     * Click **Merge** to skip all conflicting objects and import only the non-conflicting objects.
     * Click **Start Over** to abort the import.
       Fusion confirms that the import was successful:
         <img src="https://mintcdn.com/lucidworks/NgNm7Bp5nEBDIA7H/assets/images/4.0/import-objects-success.png?fit=max&auto=format&n=NgNm7Bp5nEBDIA7H&q=85&s=e2416d872ac6a74f2d40eaa4adbde56f" alt="Successful Import" width="2880" height="1508" data-path="assets/images/4.0/import-objects-success.png" />
  5. Click **Close** to close the Import Fusion Objects window.

  ## Add an object to an app

  You can add objects present in other apps (or in no apps) to the open app. Some objects are linked to other apps. You can also add those directly to an app.

  * **Add an object to an app** – While in the Fusion workspace for the app to which you want to add an object, open Object Explorer and click **In Any App**. Search for or browse to the object you want to add. Hover over the object, click the App <img className="inline-image" alt="App" src="https://mintcdn.com/lucidworks/5yWZ-KtZuBe4Y_Fg/assets/images/4.0/icons/oe-app-menu.png?fit=max&auto=format&n=5yWZ-KtZuBe4Y_Fg&q=85&s=1e9322222ea76f70c278fb9c2a04ce9f" width="40" height="42" data-path="assets/images/4.0/icons/oe-app-menu.png" /> icon, and then click **Add to this app**.

      <img src="https://mintcdn.com/lucidworks/l9y7VqRhZkN9hmR0/assets/images/4.0/object-explorer-add-to-app.png?fit=max&auto=format&n=l9y7VqRhZkN9hmR0&q=85&s=472088e9361aa1bc278ad7da50e9bbdf" alt="Add to this app" width="2560" height="938" data-path="assets/images/4.0/object-explorer-add-to-app.png" />
  * **Add an object to an app directly** – In cases when an object is linked to an app, but is not linked directly to the app (it is linked via some dependency), you can add the object to an app directly.

    While in the Fusion workspace for the app to which you want to add an object directly, open Object Explorer and click **In Any App**. Search for or browse to the object you want to add. Hover over the object, click the App <img className="inline-image" alt="App" src="https://mintcdn.com/lucidworks/5yWZ-KtZuBe4Y_Fg/assets/images/4.0/icons/oe-app-menu.png?fit=max&auto=format&n=5yWZ-KtZuBe4Y_Fg&q=85&s=1e9322222ea76f70c278fb9c2a04ce9f" width="40" height="42" data-path="assets/images/4.0/icons/oe-app-menu.png" /> icon, and then click **Add to this app directly**.

      <img src="https://mintcdn.com/lucidworks/l9y7VqRhZkN9hmR0/assets/images/4.0/object-explorer-add-directly-to-app.png?fit=max&auto=format&n=l9y7VqRhZkN9hmR0&q=85&s=af54840e096bbb4e6814c7eb5960d492" alt="Add to this app directly" width="2560" height="861" data-path="assets/images/4.0/object-explorer-add-directly-to-app.png" />
</Accordion>

<Frame caption="Content-based recommendations dataflow">
  <img src="https://mintcdn.com/lucidworks/S4K1ej9-5L4WZcZ9/assets/images/5.2/content-rec-dataflow-diagram.png?fit=max&auto=format&n=S4K1ej9-5L4WZcZ9&q=85&s=70408eebeee01440f96c5af0df99720f" alt="Content-based recommendations dataflow" width="841" height="89" data-path="assets/images/5.2/content-rec-dataflow-diagram.png" />
</Frame>

Once you have run the recommender job, see **Fetch Items-for-Item Recommendations (Content-Based Method)**.

<Accordion title="Fetch Items-for-Item Recommendations (Content-Based Method)">
  In Fusion, you can download and import a query pipeline that works out of the box to fetch the items-for-item recommendations generated by the default [Content-Based Recommender](/docs/5/fusion/reference/config-ref/jobs/content-based-recommender) job.

  There are two separate pipelines attached below which work in different ways to query and return recommendations.

  **Query for recommendations only**

  1. <a href="/assets/attachments/pipelines/APPName_item_item_rec_pipelines_content.json" download>Download the `APPName_item_item_rec_pipelines_content.json` file</a>.
  2. Rename the file to replace `APPName` with the name of your Fusion app, such as `ProductCatalog_item_item_rec_pipelines_bpr.json`.
  3. Open the JSON file, replace all instances of `APPName` with the name of your Fusion app, such as `ProductCatalog`, and save it.
  4. Import the JSON file into your Fusion instance using the Query Pipelines REST API:
     ```
     curl -u USERNAME:PASSWORD <fusion_proxy>/api/query-pipelines -XPOST -H 'content-type:application/json' -d@<path/to/filename.json>
     ```
  5. In the Fusion UI, navigate to **Query** > **Query Pipelines** to verify that the new pipeline is available.

  <Note>This pipeline should be used to query the collection where the recommendations are stored. It makes a query against the `itemId` field and returns the recommended `itemId` values. To get the actual items, you need to make a second query to the respective catalog collection with the returned `itemId` values.</Note>

  No additional configuration is needed to use this pipeline with the default BPR job configuration.

  **Boost recommended products from catalog**

  1. <a href="/assets/attachments/pipelines/APPName_content_boost.json" download>Download the `APPName_content_boost.json` file</a>
  2. Rename the file to replace `APPName` with the name of your Fusion app, such as `ProductCatalog_item_item_rec_pipelines_bpr.json`.
  3. Open the JSON file, replace all instances of `APPName` with the name of your Fusion app, such as `ProductCatalog`.
  4. Fill in the `collection` name field in the first `Recommend Items for Item` stage and save the file.
  5. Import the JSON file into your Fusion instance using the Query Pipelines REST API:
     ```
     curl -u USERNAME:PASSWORD <fusion_proxy>/api/query-pipelines -XPOST -H 'content-type:application/json' -d@<path/to/filename.json>
     ```
  6. In the Fusion UI, navigate to **Query** > **Query Pipelines** to verify that the new pipeline is available.

  <Note>This pipeline queries the recommendations collection and then makes a subsequent query to the actual catalog collection boosting the recommended items and returning the actual items from the catalog. This pipeline will therefore also return recommendations even if none were generated/available.</Note>

  <Note>This pipeline expects a request parameter called `id=itemId` to be appended to the request in order to work. An example query URL to this pipeline would look like `https://example-recs-fusion.com/api/query-pipelines/APPName_items_for_user_bpr_boost/collections/catalog/select?q=**:**&id=SomeItemId`</Note>

  <Tip>If the pipeline does not appear in the **Query Pipelines** panel, you may need to attach it to your app like this:  Go to **System** > **Object Explorer**, click the **In No Apps** filter, hover over the pipeline, click the <img className="inline-image" alt="oe-app-menu" src="https://mintcdn.com/lucidworks/5yWZ-KtZuBe4Y_Fg/assets/images/4.0/icons/oe-app-menu.png?fit=max&auto=format&n=5yWZ-KtZuBe4Y_Fg&q=85&s=1e9322222ea76f70c278fb9c2a04ce9f" width="40" height="42" data-path="assets/images/4.0/icons/oe-app-menu.png" /> icon, and select **Add to this app**.</Tip>

  **See also**

  * [Items-For-Item Recommendations](/docs/5/fusion/getting-data-out/query-enhancement/recommendations/items-for-item)
  * [Content-Based Recommender job](/docs/5/fusion/reference/config-ref/jobs/content-based-recommender)
  * [Getting Started with Recommendations and Boosting](/docs/5/fusion/getting-data-out/query-enhancement/recommendations/getting-started)
</Accordion>
