PHPackages                             lazar/elastic - 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. lazar/elastic

ActiveLibrary[Search &amp; Filtering](/categories/search)

lazar/elastic
=============

elasticsearch for news portals

v0.07(1y ago)030PHPPHP ^7.2|^8.0

Since Feb 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Lazar0405/elasticsearch-for-news-portal)[ Packagist](https://packagist.org/packages/lazar/elastic)[ RSS](/packages/lazar-elastic/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (8)Used By (0)

elasticsearch-for-news-portal
=============================

[](#elasticsearch-for-news-portal)

Installation:
-------------

[](#installation)

If Front and CMS are separate projects, the installation procedure is as follows.

1. composer require lazar/elastic (on both projects)
2. php artisan vendor:publish --tag=config --provider="News\\Elasticsearch\\ElasticsearchServiceProvider" (on both projects)
3. Set up config/elasticsearch.php (on both projects)
4. php artisan vendor:publish --tag=controller --provider="News\\Elasticsearch\\ElasticsearchServiceProvider" (front)
5. php artisan vendor:publish --tag=commands --provider="News\\Elasticsearch\\ElasticsearchServiceProvider" (cms)
6. Use Package :D

CMS
---

[](#cms)

The console command to create the index is run manually. The console command for updating the index is started with the help of ArticleObserver, so that it "listens" to what is happening with the article. Depending on whether it is created, updated or deleted, it will start the corresponding method. In the config file, the "run\_observer" key is set to "true" to enable the index to be updated. Also, if you want to enable search by tag, you can do so by setting the key "include\_tags\_in\_search" to "true" in the config file.

Front
-----

[](#front)

Adjust the config file depending on the config file from the CMS. Customize the view blade based on the data you get from the controller. If your portal is

Enabling Search for Serbian Special Characters
----------------------------------------------

[](#enabling-search-for-serbian-special-characters)

If your portal is in the Serbian language and you want to include special characters such as Č, Ć, Š, Ž, Đ in the search functionality, you need to add the following configuration to the index at the beginning of the index body:

```
        'settings' => [
            'analysis' => [
                'filter' => [
                    'serbian_folding' => [
                        'type' => 'asciifolding', // Converts diacritical characters
                        'preserve_original' => true
                    ]
                ],
                'analyzer' => [
                    'serbian_analyzer' => [
                        'type' => 'custom',
                        'tokenizer' => 'standard',
                        'filter' => ['lowercase', 'serbian_folding']
                    ]
                ]
            ]
        ],
```

For each field you want to search by, add 'analyzer' =&gt; 'serbian\_analyzer'. For example, if you're searching by title, it would look like this:

```
        'heading' => [
            'type' => 'text',
            'analyzer' => 'serbian_analyzer'
        ],
```

This will ensure that Serbian diacritical characters are properly handled in the search functionality of your portal.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance43

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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 ~2 days

Total

7

Last Release

451d ago

### Community

Maintainers

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

---

Top Contributors

[![Lazar0405](https://avatars.githubusercontent.com/u/179207998?v=4)](https://github.com/Lazar0405 "Lazar0405 (22 commits)")

### Embed Badge

![Health badge](/badges/lazar-elastic/health.svg)

```
[![Health](https://phpackages.com/badges/lazar-elastic/health.svg)](https://phpackages.com/packages/lazar-elastic)
```

###  Alternatives

[elasticsearch/elasticsearch

PHP Client for Elasticsearch

5.3k178.3M943](/packages/elasticsearch-elasticsearch)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15224.3M65](/packages/opensearch-project-opensearch-php)[mailerlite/laravel-elasticsearch

An easy way to use the official PHP ElasticSearch client in your Laravel applications.

934529.3k2](/packages/mailerlite-laravel-elasticsearch)[laminas/laminas-filter

Programmatically filter and normalize data and files

9528.0M150](/packages/laminas-laminas-filter)[babenkoivan/elastic-adapter

Adapter for official PHP Elasticsearch client

404.0M9](/packages/babenkoivan-elastic-adapter)[terminal42/escargot

A web crawler or spider library based on Symfony components

581.4M3](/packages/terminal42-escargot)

PHPackages © 2026

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