designmynight / laravel-elasticsearch Goto Github PK
View Code? Open in Web Editor NEWUse Elasticsearch as a database in Laravel to retrieve Eloquent models and perform aggregations.
License: MIT License
Use Elasticsearch as a database in Laravel to retrieve Eloquent models and perform aggregations.
License: MIT License
When executing a Date Histogram aggregation, Elasticsearch will only return a bucket for each interval if there is any data.
To receive a bucket for days containing no data, the min_doc_count
and extended_bounds
must be specified.
https://www.elastic.co/guide/en/elasticsearch/guide/current/_returning_empty_buckets.html
The configuration key for the ES hosts is currently host
The host
config value is then exploded and assigned to a variable called $hosts
.
Could we first check for a hosts
config value before falling back to host
to maintain backward compatibility?
The geo distance order creates the following parse exception with the sort in the current format but it should be according to the documentation.
Error message
{
"error": {
"root_cause": [
{
"type": "parse_exception",
"reason": "illegal latitude value [269.1829025745392] for [GeoDistanceSort] for field [object.location.coordinates]."
}
]
}
}
Current JSON format
{
"sort": [
{
"_geo_distance": {
"object.location.coordinates": [
"51.5357244",
"-0.08530299999999999"
],
"order": "asc",
"unit": "km",
"distance_type": "plane"
}
}
]
}
When adding a boost it throws an exception "type not defined". This happens because the function assumes the boost is being applied to the type field.
As discussed in #3 - include support for indexing as part of this package.
Would it be useful to have an Indexable
for Eloquent models to use?
This trait could supply these helpful methods:
getElasticsearchEloquentBuilder()
getElasticsearchQueryBuilder()
updateIndex()
addToIndex()
removeFromIndex()
The first two would simplify the setup process as described in the readme. The last three would create a simple interface for client code to index models and remove duplication of indexing logic in client code.
When I try and use the command make:mapping it isn't there. I also can't find it anywhere in the code, is this some deprecated functionality or whats going on here?
If anyone could help me out get started using this package it would be much appreciated, thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.