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

# Result List tag

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/app-studio/concepts/rendering-search-results/result-list-tag

[old doc.lw link]: https//doc.lucidworks.com/app-studio/4.2/3095

[mintlify link]: https://doc.lucidworks.com/docs/4/app-studio/concepts/rendering-search-results/result-list-tag

The Result List tag displays the results for a given Response. While it can be used as a standalone tag to output every field for each result, it is most often contains a Result tag with numerous Field tags.

<LwTemplate />

## Usage

This example shows how to display all results returned by the Platform. It shows two alternative methods of referencing the fields of each item:

* Using angular syntax to use the value directly
* Using the Field tag to produce strictly valid XHTML with comprehensive CSS selectors.

```xml wrap  theme={"dark"}
<search:result-list response="response">
     <search:result>
          <h2><a ng-href="{{result | field:'url' | actual}}" target="_top">{{result | field:'title' | actual}}</a></h2>
          <search:field name="body" label=""></search:field>
          <search:field name="concepts" label="concepts" query="query" separator=";"></search:field>
     </search:result>
</search:result-list>
```

While not strictly required, the nested `<search:result>` tag is recommended. For more details, refer to the [Result tag](/docs/4/app-studio/concepts/rendering-search-results/result-tag).

## Nested Result Lists

Some search platforms, such as Solr (when using Grouping) will create Results with further nested Results. In Appkit terminology these are named 'related results'. A JOIN will produce a secondary set of hits for each result in the response. This secondary set of hits can be accessed and output using a nested Result List tag:

```xml wrap  theme={"dark"}
<search:result-list response="response">
    <search:result>
        <search:field name="country" label="" value-element="h2"></search:field>
        <search:field name="text" label=""></search:field>
        <search:field name="climate" label="Climate" query="query"></search:field>
        <h3>Cities in {{result | field:'title' | actual}}</h3>

        <!-- Nested list of related Results -->
        <search:result-list results="result.related">
            <search:result>
                <search:field name="city" label=""></search:field>
            </search:result>
        </search:result-list>
    </search:result>
</search:result-list>
```

See the [`search:result-list`](/docs/4/app-studio/reference/tags/lightning.directive.searchResultList) tag doc for all available attributes.

### Tag body variables

The body of the tag will be repeated for every result in the Response.

`${result} (twigkit.model.Result)`\
The result being output. See the Result for available properties.

* To get a String representation of a Field use: `{{result | field:'name' | actual}}` or `{{result | field:'title' | display}}`.
