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

> 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/lucidworks-search/07-improve-your-queries/recommendations/items-for-query

[mintlify link]: https://doc.lucidworks.com/docs/lucidworks-search/07-improve-your-queries/recommendations/items-for-query

[old doc.lw link]: https://doc.lucidworks.com/managed-fusion/5.9/g8cwr6

The Items for Query recommender is the primary algorithm that supports recommendations on the search results page.

Items-for-query recommendations are based on how other users interacted with search results from the same query. This is one type of [collaborative recommendation](/docs/lucidworks-search/07-improve-your-queries/recommendations/methods-recs#content-based-vs-collaborative-recommendations).

For example, if users have searched for "titanic" in the past and many of them clicked on the search result for the DVD of the movie *Titanic* (as opposed to books or memorabilia), then this method boosts the DVD item on subsequent searches for "titanic".

Below is an example of items-for-query recommendations based on a search for "madonna":

<img src="https://mintcdn.com/lucidworks/1R8QVvJzt46cZDT6/assets/images/4.2/recommendations-items-for-query.png?fit=max&auto=format&n=1R8QVvJzt46cZDT6&q=85&s=a2e7ee7bb0b401da69cef14926c5ab45" alt="Items-for-query examples" width="2559" height="1397" data-path="assets/images/4.2/recommendations-items-for-query.png" />

To use this type of boosting, signals must be enabled but recommendations need not be.

<LwTemplate />

## Job configuration

The items-for-query recommendations are implemented as a [Query-to-Query Session-Based Similarity](/docs/lucidworks-search/09-developer-documentation/config-specs/jobs/query-to-query-session-similarity) job.

## Query pipeline configuration

The [Boost with Signals](/docs/lucidworks-search/09-developer-documentation/config-specs/query-pipeline-stages/boost-with-signals) query stage is part of the default query pipeline, so usually you do not need to add it. It takes its input from the aggregated signals collection (`COLLECTION_NAME_signals_aggr`) at query time.
