Searching

Introduction

The Search module uses built in search functionality for searching and indexing model data.

Search Documentation{.link}

Searching

The Search module allows you to search multiple indexes by starting queries with the search function. You can use the in method to specify which streams to search by specifying them like namespace.stream.

{% results = search(term).in(['pages.pages', 'posts.posts']).get() %}

Search Results

The results from the search function is a collection of items. The item provides a polymorphic entry relationship to the original indexed entry.

{% for result in results %}
<a href="{{ result.entry.route('view') }}">{{ result.entry.title }}: {{ result.entry.id }}</a>
{% endfor %}