Releases: Spameri/Elastic
Fix release
Merge pull request #5 from Spameri/migrate-command Fixes
Data dumping
New command
- Dump index
spameri:elastic:dump-index
dumps all data from index to specified file - Handy for moving documents to another index
- Or for backing purposes
New command
- Load dump
spameri:elastic:load-dump
loads dumped data from file - Handy for moving documents to another index
- Or for backing purposes
New command
- Type to new index
spameri:elastic:move-type
- Moves documents from type to new index
- Use when you need to split old index with multiple types
Added type support to ElasticSearch services for working with old indexes which has multiple types.
Search returns ResultSearch object.
DeleteMultiple and InsertMultiple maps response to class \Spameri\ElasticQuery\Response\ResultBulk
New Indices services
- Close, Open for clean in objects closing and opening indexes
- Create to create empty index with no settings
- Get to get all settings and mappings for index
- GetMapping for getting mapping for specific index or index and type
- PutMapping for putting mapping for specific index or index and type. And you can specify dynamic option of index
Please bare in mind that types will be deprecated in ES and are added here only to provide backward compatibility.
Tests + Travis
- Fix services in neon
- Added some tests
- Set up tests environment
- Travis update
- CS + PHPStan
New Commands, Result Object and Aggregate Basics
Commands
spameri:elastic:update-mapping
- updates mapping for existing entity,spameri:elastic:add-alias $index $alias
add alias to existing indexspameri:elastic:remove-alias $index $alias
removes alias from existing indexspameri:elastic:validate-mapping
- Best command, validates your neon config options for number of errors and best practices.
Mapping validation covers basic rules of settings for index:
- unique field name in index context
- not supported parameter in field context
- not supported tokenizer
- not supported analyzer
- not supported type of field
DateTime
- New
Date
andDateTime
objects for easier specifying format for ElasticSearch - Comes with prepared format no need to specify
- Supported when converting to ElasticSearch document
Aggregate
- Added aggreage method to
BaseService
- Runs aggregate in Entity/Index context
- Returns new ResultObject - more bellow
Result Objects
- Introduced in https://github.com/Spameri/ElasticQuery/releases/tag/v0.2.0 and expanded
in https://github.com/Spameri/ElasticQuery/releases/tag/v0.3.0 all object structure infromation you can read there - Dropped
ResultCollection
- No more array responses from core function (
get
,getBy
,aggregate
...) instead there is ResultSearch or ResultSingle object witch has HitCollection and AggregationCollection with our data. IEntityFactory
now accepts single class \Spameri\ElasticQuery\Response\Result\Hit
Diff v0.1.2...v0.2.0
ElasticQuery - version bump
v0.1.2 ElasticQuery version
Fix default values
- bump elastic query version
ElasticSearch implementation in Nette framework
Fetching data from ElasticSearch, filtering, aggregation and more.
Why this library?
Not because of speed, coolness, scalability.
This is here because queries are typed objects. Hopefully easy to understand and true to ElasticSearch great documentation.
Documents in ElasticSearch are typed objects.
Responce is mapped on typed objects.