PHPackages                             am-impact/amsearch - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. am-impact/amsearch

ActiveCraft-plugin[Search &amp; Filtering](/categories/search)

am-impact/amsearch
==================

Search plugin for Craft

2.0.7(10y ago)24452[2 issues](https://github.com/am-impact/amsearch/issues)[1 PRs](https://github.com/am-impact/amsearch/pulls)PHP

Since Jan 4Pushed 8y ago10 watchersCompare

[ Source](https://github.com/am-impact/amsearch)[ Packagist](https://packagist.org/packages/am-impact/amsearch)[ RSS](/packages/am-impact-amsearch/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (1)Versions (7)Used By (0)

amsearch
========

[](#amsearch)

*Searching in Craft*

Searching
---------

[](#searching)

Normally you can search in one Element Type at a time, when sometimes, you want to search in multiple. E.g. you want to display entries and users based on the keywords that are given. You also want to display an excerpt, which is built based on the search keywords.

### Collections

[](#collections)

This is where you decide what Element Type should be searched for.

If an Element Type doesn't have an URL by itself (E.g. users), you can set a **custom URL format** in the collection's settings. E.g.: ***users/{id}/{firstName}-{lastName}***

[![NewCollection](https://raw.githubusercontent.com/am-impact/am-impact.github.io/master/img/readme/amsearch/new-collection.png "NewCollection")](https://raw.githubusercontent.com/am-impact/am-impact.github.io/master/img/readme/amsearch/new-collection.png)

### Search types

[](#search-types)

There are two types available.

The **standard** type, is the one that'll be used the most. It uses Craft's search functionality, but without the use of records &amp; models. This means that anything that is related (relations) to this Element Type, is **not** available in the search result.

It is probably a bit confusing when you see the **fuzzy** type. While building this plugin, the original idea was that one should be able to get all available search results at once, and then **filter** based on the user's input. Basically this'll look like functionality that has been used in [a&amp;m command](https://github.com/am-impact/amcommand). In order to use this, you can use the **fuzzy.min.js** in the resources folder of this plugin.

### Settings

[](#settings)

[![Settings](https://raw.githubusercontent.com/am-impact/am-impact.github.io/master/img/readme/amsearch/settings.png "Settings")](https://raw.githubusercontent.com/am-impact/am-impact.github.io/master/img/readme/amsearch/settings.png)

### Example: Search results template

[](#example-search-results-template)

Based on a **standard** collection type. You can search in multiple collections when you give an array to the collections parameter. E.g.: **collections: \['entries', 'users', 'assets'\]**.

```
{% set keywords = craft.request.getParam('keywords') ?: false %}
{% set criteria = {
    collections: ['entries'],
    params: {
        limit: 2,
        keywords: keywords
    }
} %}

{% amSearchPaginate criteria as searchResults %}
    {# Search results #}
    {% if not searchResults|length %}
        {{ 'There are no search results.' }}
    {% else %}
        {% for searchResult in searchResults %}

                    {% if searchResult['title'] is defined %}{{ searchResult.title }}{% endif %}
                    {{ searchResult.excerpt }}

        {% endfor %}

        {# Pagination #}
        First Page
        {% if amSearchPaginate.prevUrl %}Previous Page{% endif %}

        {% for page, url in amSearchPaginate.getPrevUrls(5) %}
            {{ page }}
        {% endfor %}

        {{ amSearchPaginate.currentPage }}

        {% for page, url in amSearchPaginate.getNextUrls(5) %}
            {{ page }}
        {% endfor %}

        {% if amSearchPaginate.nextUrl %}Next Page{% endif %}
        Last Page
    {% endif %}

```

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~23 days

Total

6

Last Release

3658d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ae37e8bdbd8456b5140fe0bec73129ffde4751deb7f98c5bafb1608e988759b5?d=identicon)[hubertprein](/maintainers/hubertprein)

---

Top Contributors

[![nweevers](https://avatars.githubusercontent.com/u/1636038?v=4)](https://github.com/nweevers "nweevers (2 commits)")

### Embed Badge

![Health badge](/badges/am-impact-amsearch/health.svg)

```
[![Health](https://phpackages.com/badges/am-impact-amsearch/health.svg)](https://phpackages.com/packages/am-impact-amsearch)
```

###  Alternatives

[10up/elasticpress

Supercharge WordPress with Elasticsearch.

1.3k374.3k6](/packages/10up-elasticpress)[offline/oc-site-search-plugin

This plugin adds global search capabiliies to OctoberCMS.

4528.2k](/packages/offline-oc-site-search-plugin)[kvz/elasticsearch

CakePHP Plugin for ElasticSearch

4410.5k](/packages/kvz-elasticsearch)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
