Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tags: PHP-CMSIG/search

Tags

0.12.7

Toggle 0.12.7's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Update code style changes after PHP CS Fixer update (#640)

Some new changes from PHP CS Fixer are applied here like `static` to
anonymous functions.

0.12.6

Toggle 0.12.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Allow Loupe v0.13 (#624)

Loupe 0.13 was released: https://github.com/loupe-php/loupe/releases/tag/0.13.0

0.12.5

Toggle 0.12.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add virtual packages for seal adapters (#620)

All seal adapters will provide `cmsig/seal-adapter-implementation`.

All seal adapters in core go with:

```json
    "provide": {
        "cmsig/seal-adapter-implementation": "self.version"
    },
```

Custom adapters need provide the related / supported `cmsig/seal`
version:


```json
    "provide": {
        "cmsig/seal-adapter-implementation": "0.12.0"
    },
```

As I personally not a big fan of the virtual packages we will currently
not require them in our `integration` packages. But third party are this
way free to require it to make composer fail if no adapter was required
by the project / library.

This should help eventuall a future `contao/backend-search-bundle`
package to require `"cmsig/seal-adapter-implementation": "^0.12"` if
they want that behaviour.

0.12.4

Toggle 0.12.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add support for JsonObjectField (#616)

This adds a new field type which is just here to store metadata in a
json object (`array<string, mixed>`). This kind of data is not search,
facet or filterable.

Usage:

```php
new Index('test', [
    'uuid' => new Field\IdentifierField('uuid'),
    'title' => new Field\TextField('title', sortable: true),
    'metadata' => new Field\JsonObjectField('metadata'),
]);
```

```php
$engine->saveDocument([
    'uuid' => $uuid,
    'title' => $title,
    'metadata' => [
        'routeAttributes' => [
            'site' => 'example',
        ],
    ],
]);
```

See #614

This feature is experimental and may change in future releases.

0.12.3

Toggle 0.12.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Remove none found identifiers in reindex (#603)

To make removal easier the reindex will automatically remove document
which where not provided by requested by the ReindexConfig. This make
specially handling inside ORMs or Listeners on Add, Update, Remove a lot
easier. As they just need to feel up identifiers. Thx goes to @Toflar
who provided suggestion in #472.

fixes #472

### ToDo

 - [x] Add test case
 - [x] Reindex is async and requires in some cases return a task

0.12.2

Toggle 0.12.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add documentation for the factory methods to Condition and Facet clas…

…ses (#602)

If people don't read the documentation they are may not aware of the
`Condition::` or `Facet::` methods. So it should be documented also in
the code via PHPDocs.

0.12.1

Toggle 0.12.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add Static Factory methods for Conditions and Facets (#600)

Current state is that for a good `DX` developers need to import
`CmsIg\Seal\Search\Condition` and use `new Condition\...`. This looks
like this:

```php
use CmsIg\Seal\Search\Condition;

$result = $this->engine->createSearchBuilder('blog')
    ->addFilter(new Condition\AndCondition(
        new Condition\EqualCondition('tags', 'Tech'),
        new Condition\OrCondition(
            new Condition\EqualCondition('tags', 'UX'),
            new Condition\EqualCondition('isSpecial', true),
        ),
    ))
    ->getResult();
```

But some Code Styles prevent that and so they require to import every
conditions by themselves. In that case the Developer Experience is bad
as autocomplete don't work.

For core based filters we could maybe create a additional `Condition`
class which is a helper to quickly create the conditions without the
need for `new SomeCondition`, this could look like this:

```php
use CmsIg\Seal\Search\Condition\Condition;

$result = $this->engine->createSearchBuilder('blog')
    ->addFilter(Condition::and(
        Condition::equal('tags', 'Tech'),
        Condition::or(
            Condition::equal('tags', 'UX'),
            Condition::equal('isSpecial', true),
        ),
    ))
    ->getResult();
```

The query builder would so still be PHP and static code analyzer like
phpstan can validate most params, but without the force of every
conditions being imported by itself.

## Todo

- [x] Add Condition class
- [x] Add Facet class
- [x] Update Tests
- [x] Update Documentation

---

fixes #481

0.12.0

Toggle 0.12.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix issues with filters by Date Fields (BC Break ⚠️) (#594)

Filters based on `datetime` fields seems currently not work correctly
in:

 - [x] Loupe (expect integer in filter)
 - [x] Typesense (expect integer in filter)
- [x] Meilisearch (expect integer in filter, and schema as integer)
(requires drop reindex)
- [x] Algolia (expect integer in filter, and schema as integer)
(requires drop reindex)
- [x] RediSearch (expect integer in filter, and schema as integer)
(requires drop reindex)
- [x] Solr (expect specific format in filters, and in indexing)
(requires drop reindex)

⚠️ `Marshaller` and `Flattenmarshaller` services also changed the
`dateAsInteger: true` was removed in favor of `dateFormat: 'U'`. To
allow different date formats for Example for Solr which requires a
specific format. As they are still `@internal` there are no issues with
BC Break here. But still a reindex is required for Solr, Redisearch and

fixes #587

0.11.0

Toggle 0.11.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Specifiy Python Version for Documentation Build (#591)

Not define the python version is deprecated.

0.10.3

Toggle 0.10.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add retry handling for github ci docker compose up command (#582)

If docker compose up fails it mostly just an issue on network connection
or something else. So just try it 3 times before it fails. No retry
script, such keep it simple with `||`.