galexth / elasticsearch-odm
elasticsearch odm
v2.8
2019-11-08 11:29 UTC
Requires
- php: >=7.1.3|^7.2
- ext-json: *
- illuminate/support: ^5.6|^6.0
- ruflin/elastica: ^6.0
Requires (Dev)
- fzaninotto/faker: ~1.6
- illuminate/validation: ^5.6|^6.0
- kint-php/kint: ^2.1
- mockery/mockery: ~1.0
- monolog/monolog: ^1.22
- phpunit/phpunit: ~7.0
- dev-master
- v2.8
- v2.7.6
- v2.7.5
- v2.7.4
- v2.7.3
- v2.7.2
- v2.7.1
- v2.7
- v2.6.2
- v2.6.1
- v2.6
- v2.5
- v2.4.1
- v2.4
- v2.3
- v2.2.2
- v2.2.1
- v2.2
- 2.1.8
- v2.1.7
- v2.1.6
- v2.1.5
- v2.1.4
- v2.1.3
- v2.1.2
- v2.1.1
- v2.1
- v2.0
- v1.2.3
- v1.2.2
- v1.2.1
- v1.2
- v1.1.1
- v1.1.0
- v1.0.1
- v1.0
- dev-dev
- dev-connection_manager
- dev-new_elastica
- dev-timestamps
This package is auto-updated.
Last update: 2025-03-08 21:00:05 UTC
README
Elastic ODM
$doc = Document::setQuery( (new BoolQuery())->addFilter(new Term(['field' => $field])) ->addFilter(new Term(['field2' => $field2])) )->firstOrFail(); $doc->delete(); ]);
Get documents collection with filtered _source
$document = $query->get(['field1']);
Get single document
$document = $query->first();
$document->setHidden(['field1', 'field2']);
$document->toArray();