All notable changes to this project will be documented in this file based on the Keep a Changelog Standard. This project adheres to Semantic Versioning.
- Drop support for PHP 8.0 - PHP 8.1 is now the minimum version.
- Upgraded PHPUnit to version 10.5
- Refactor some code to take advantage of PHP 8.1 features (read-only properties)
- Fix tests that used deprecated/removed features on PHPUnit 10.5
- Refactor tests to be more PHPUnit 10.5 compliant (e.g. using attributes for data providers, make all data providers static, etc.)
- Updated versions of continuous integration components
- Send
scroll_id
in the body of the request inRepository::findByScrollId
to get rid of deprecation notices
AbstractBoolQuery
class is now strongly typed to only acceptCriteriaInterface
instances on constructor andcreate
methodQuery
class is now strongly typed to only acceptCriteriaInterface|AggregationInterface
instance on constructor andcreate
andcreateNested
methods- But those methods still will only properly accept
FilterInterface
,NestableQueryInterface
,SearchInterface
orAggregationInterface
implementations
- But those methods still will only properly accept
-
Added the following methods to
Repository
clearScrollId
- To clear a scroll id after running scroll operations (see https://www.elastic.co/guide/en/elasticsearch/reference/7.9/clear-scroll-api.html)
deleteBulk
- To bulk delete all documents matching the given ids (see https://www.elastic.co/guide/en/elasticsearch/reference/7.9/docs-bulk.html)
findByIds
- To bulk retrieve multiple documents based on the given ids (see https://www.elastic.co/guide/en/elasticsearch/reference/7.9/docs-multi-get.html)
-
Added the following methods to
IndexManager
getSingleIndexByAlias
- To get a single index by an alias
- Fixed code standards
- Refactor some code to take advantage of PHP 8.0 features (promoted properties, match, arrow functions, etc.)
- Split repository tests class into multiple classes (one per method) to simplify maintenance of tests
- Added the possibility of using the range aggregation (see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-range-aggregation.html).
- Added functionality for PrefixQuery (see https://www.elastic.co/guide/en/elasticsearch/reference/7.9/query-dsl-prefix-query.html).
- Removed support for mapping types in
IndexManager::putMapping()
( see https://www.elastic.co/guide/en/elasticsearch/reference/7.17/removal-of-types.html)
- Config option for setting
scroll_context_keepalive
perRepository
and/or perQuery
( see https://www.elastic.co/guide/en/elasticsearch/reference/7.9/paginate-search-results.html#scroll-search-results)
- Removed support for mapping types (see https://www.elastic.co/guide/en/elasticsearch/reference/7.17/removal-of-types.html)
- Include
null
as an acceptable value to the document attribute ofUpsertException
andUpdateException
- Replace
PersistableEntityInterface
by object inRepository::findById()
method
- Support for simple document updates (see https://www.elastic.co/guide/en/elasticsearch/reference/7.9/docs-update.html)
- Typehinting on
Repository
methods
- Dropped support for PHP 7.x
- Dropped support for Elasticsearch < 7.x
- Changed class names of full-text queries (e.g.
Match
toMatchQuery
). This is due to"match"
becoming a reserved keyword in PHP 8
- Support for
track_total_hits
option on read requests ( see https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking-changes-7.0.html#hits-total-now-object-search-response) - Version matrix in README
- Fixed request format of
Repositry::upsert()
- Fixed request format of
Repositry::upsert()
Repository::upsert()
method to make use of Elasticsearch'update
API withdoc_as_upsert
option.
Repository::upsert()
method to make use of Elasticsearch'update
API withdoc_as_upsert
option.
- Upgraded elasticsearch/elasticsearch to a version compatible with Elasticsearch 7. This comes with breaking changes for Elasticsearch 6!
- Compatibility to Elasticsearch 7.x versions on
Repository::parseRawSearchResponse
Repository::deleteByQuery()
was added to support bulk delete operations
- Add optional extra parameters to
IndexManagerInterface::putMapping
and respective implementation inIndexManager::putMapping
- This will be used to update schema mappings in
kununu/elasticsearch-bundle
with a forward compatibility layer for ES 7.x which requiresinclude_type_name=true
- This will be used to update schema mappings in
Repository::saveBulk()
was added to support bulk index operations
- Third party dependency upgrades (
phpunit
andmockery
)
- Introduce
force_refresh_on_write
configuration option for repositories. It can be used to force an index refresh after every write operation. This can be very handy for functional and integration tests. But caution! Using this in production environments can severely harm your ES cluster performance.
- Allow to pass source fields to return on
Repository::findById
instead of receiving the entire document
- Introduce term query specifically for search context
- Third party dependency upgrades (
phpunit
andpsr/log
)
- Distinguish
DocumentNotFoundException
from genericDeleteException
when trying to delete non-existent documents viaRepository::delete()
- Support put settings for
refresh_interval
andnumber_of_replicas
to elastic search index
- Support for
inner_hits
option for nested queries
- Removed support for Filter Aggregation as is does not fit in the current scheme of things and therefore did not work
- Introduce term query specifically for search context
- Support for fieldless aggregations: Filter Aggregation
- Support for fieldless aggregations: Filters Aggregation to start with
- Nested queries
Repository::findById()
now catches\Elasticsearch\Common\Exceptions\Missing404Exception
and returns null
- allow objects to be pushed into
ResultIterator
- Fixed return type hint of
UpsertException::getDocument()
- Method
Repository::findById()
added
- Created more specific Exceptions extending
RepositoryException
. They can hold operation specific payload (f.e. document and documentId for upsert operations withRepository::save()
)
- Removed support for Elastica as Elasticsearch client
- Removed adapters completely (Repository is now directly using
\Elasticsearch\Client
) - Removed
ElasticaQuery
- Removed
ruflin/elastica
from list of dependencies - Removed method
ElasticsearchRepository::deleteIndex()
in favor ofIndexManager::deleteIndex()
- Renamed
ElasticsearchRepository
toRepository
- Renamed
ElasticsearchRepositoryInterface
toRepositoryInterface
- Changed signature of
RepositoryInterface::save()
and thereforeRepository::save()
postSave
andpostDelete()
hooks for repositories- Index management features via
IndexManager
- Entity class for repositories: if configured with an entity class, a repository will emit entity objects of this type instead of plain documents and accepts such objects on the
save()
method - Entity factory for repositories: if configured with an entity factory, a repository will emit entity objects instead of plain document arrays
- Entity serializer for repositories: if configured with an entity serializer, a repository accepts objects on the
save()
method and serializes them using the given serializer
- Really downgraded dependency
elasticsearch/elasticsearch
from 6.7.* to 6.5.* to be compatible with the official version matrix - fixed a few tests to be more precise
- Added support for dedicated index aliases for read and write operations (connnection options
index_read
andindex_write
)
none
none
none
none
none
none
none
none
- Downgraded dependency
elasticsearch/elasticsearch
from 6.7.* to 6.5.* to be compatible with the official version matrix
none
none
none
none
- use SPL standard exceptions where appropriate (#1)
- remove unused exception classes
none
none
none
none
- set minimum stability of composer dependencies to "stable"
none
Initial checkin of sources originally developed in kununu/culture
.