PHPackages                             oe/lukas - 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. oe/lukas

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

oe/lukas
========

Search Query Helper

2511.7k7[6 issues](https://github.com/OnroerendErfgoed/Lukas/issues)PHP

Since Aug 14Pushed 10y ago9 watchersCompare

[ Source](https://github.com/OnroerendErfgoed/Lukas)[ Packagist](https://packagist.org/packages/oe/lukas)[ RSS](/packages/oe-lukas/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Lukas - Search Query Handler
============================

[](#lukas---search-query-handler)

Lukas is a library that helps in implementing a custom search query language. It offers some standard features users have come to expect from text driven search like boolean operators and subexpressions.

Lukas can also help you implement custom behaviour for certain keywords, you might for eg. define that keyword "photo" to mean "search for things that have a photo".

Unit Tests
----------

[](#unit-tests)

[![Build Status](https://camo.githubusercontent.com/317a2a5a14a984954a673e53fa1df2b7195eacb402c465388195162c3760f73b/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f4f6e726f6572656e64457266676f65642f4c756b61732e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/OnroerendErfgoed/Lukas)

Query Syntax
------------

[](#query-syntax)

The Lukas query parser supports a fairly universal search query standard. It is meant to support the most common search combinations while be fairly simple to use by non-technical users.

It supports the following features:

- Keywords are split on whitespace, eg. *Lukas me* contains two keywords.
- Keywords can be grouped using quotation marks, eg. *"Lukas me"* only contains one keyword.
- Keywords can be combined using boolean and, eg. *Lukas AND me*. This is also the default combination, so *Lukas me* is the same as *Lukas AND me*.
- Keywords can be combined using boolean or, eg. *Lukas OR me*.
- Keywords can be negated using boolean, written as *-keyword*, eg. *-Lukas*.
- Combinational logic can be specified using parentheses, eg. *Lukas OR (me AND you)*.
- A keyword can be explicitely marked as belonging to a certain domain, eg. *people:Lukas*.

Installation
------------

[](#installation)

Lukas can be installed from [packagist](http://packagist.org) through [composer](http://getcomposer.org). Add a file called *composer.json*that contains the following:

```
{
	"require": {
		"oe/lukas": "dev-master"
	}
}
```

Please bear in mind that Lukas is still in active development. Installing "dev-master" means you are running from trunk. As soon as we hit a stable version it would be best to change "dev-master" to eg. "0.1.0"

Download and install composer:

```
curl -s http://getcomposer.org/installer | php

```

Install Lukas:

```
php composer.phar install

```

Examples
--------

[](#examples)

The examples folder contains some samples of what can be parsed and how a certain string will be parsed.

Contributing
------------

[](#contributing)

All contributions are welcome. Please fork the repository and send us a pull request. If at all possible include unit tests in the pull request.

To run the unit tests, first download and install composer:

```
curl -s http://getcomposer.org/installer | php

```

Create the autoloader:

```
php composer.phar install

```

Run the unit tests:

```
phpunit

```

Out of the box this will print code coverage information to the commandline. Although this is usefull and tells us how much coverage each class has, it does not show what parts of a class are covered or not. To see that kind of information, please run phpunit like this:

```
phpunit --coverage-html build/coverage/html

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

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

---

Top Contributors

[![koenedaele](https://avatars.githubusercontent.com/u/676018?v=4)](https://github.com/koenedaele "koenedaele (18 commits)")

### Embed Badge

![Health badge](/badges/oe-lukas/health.svg)

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

###  Alternatives

[ruflin/elastica

Elasticsearch Client

2.3k50.4M203](/packages/ruflin-elastica)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15024.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)[massive/search-bundle

Massive Search Bundle

721.4M13](/packages/massive-search-bundle)[shyim/opensearch-php-dsl

OpenSearch/Elasticsearch DSL library

175.9M9](/packages/shyim-opensearch-php-dsl)[outl1ne/nova-multiselect-filter

Multiselect filter for Laravel Nova.

45802.7k3](/packages/outl1ne-nova-multiselect-filter)

PHPackages © 2026

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