fadion / bouncy Goto Github PK
View Code? Open in Web Editor NEWMap Elasticsearch results to Eloquent models
License: MIT License
Map Elasticsearch results to Eloquent models
License: MIT License
what's the default data path?I can't find it anywhere.
Hi,
I tried creating the $documentFields property in my model but was getting an error in my IDE, "expression is not allowed as field default value". I even copied the array in the documentation thinking that I probably have a typo somewhere but got the same error.
I needed to do this as I need to have a custom field for "full_name" which is a concatenation of first_name and last_name but I don't want to have to create this in my database.
Can you reproduce this error? what seems to be the issue?
Thanks.
I can only search out one record,even have many records.
and highlight() method don't work at all,why?
Such a good plug-in Why not update the ah? can you continue to update ?
Hi,
Can you add support for Laravel 5 Pagination? The current implementation doesn't work and it throws an error "Class 'Illuminate\Support\Facades\Paginator' not found - since it doesn't exist", And the errors keeps on coming for every fix made.
Hopefully you will provide a fix soon.
Thanks.
I've used elasticquent, but for storing versioning of documents i found that Bouncy package is usable, but one question that is not clear for me is that, using this package can i store every actions of user, for example suppose user with id 100 update a record with id 20 and then may be the same user or other one update this record, can i store both of the actions, not replacing the previous document, and those documents will be searchable and i can access them?
Hi everyone,
Can anyone show me how to get aggregations?
I tried to pass in 'aggs' into params but the response never return the aggregations
$params = [
'query' => [
'filtered' => [
'query' => $where
],
],
'sort' => [
['id' => ['order' => 'desc']],
['rating' => ['order' => 'desc']],
'_score'
],
'highlight' => [
'fields' => [
'title' => new \stdClass
]
],
'aggs' => [
'loc_meet_types' => [
'terms' => [
'field' => 'loc_meet_type'
],
]
],
'track_scores' => true
];
the response always the same no matter i add aggs or remove aggs 👍
array:7 [▼
"per_page" => 20
"current_page" => 1
"next_page_url" => null
"prev_page_url" => null
"from" => 1
"to" => 10
"data" => array:10 [▼
0 => array:40 [▶]
1 => array:40 [▶]
2 => array:40 [▶]
3 => array:40 [▶]
4 => array:40 [▶]
5 => array:40 [▶]
6 => array:40 [▶]
7 => array:40 [▶]
8 => array:40 [▶]
9 => array:40 [▶]
]
]
p.s I'm using aws ElasticSearch with version 1.5.3
Please check on this line. https://github.com/fadion/Bouncy/blob/l5/src/Fadion/Bouncy/BouncyTrait.php#L588
I dont understand why it is done this way instead of using an existing Client from IoC container?
Can you add support to modify what data get's put into Elasticsearch, like in Elasticquent.
I don't think this is a good way:
$attributes = $hit['_source'];
$attributes['id'] = $hit['_id'];
and if you search like this:
Question::search(['query'=>['match'=>['_all'=>'beijing']],'_source'=>['location','title','body']]);
I originally don't want to get "id",but now I was forced got it ,in this case,it should be as a bug.
Thanks for your efforts to make querying Elasticsearch using Laravel a breeze. Any plans to port this to Laravel 5 support soon?
Can anyone please suggest what are the changes that required to use this plug-in for using 6.2 version.
After indexing i have tried to get the results for the date range, but it is not giving any results.
$params = [
'query' => [
'match_all' => []
],
'filter' => [
'range' => [
'created_at' => [
'gte' => '2017-06-18',
'lte' => '2017-06-19'
]
]
],
'size' => 10
];
Is there a way to add custom analyzers while indexing? Like I want to use nGram tokenizer to analyze.
Hi all, has anyone worked with co-ordinates, I am not sure how to setup the mapping in the model for a geo_point/pin.
Any assistance greatly appreciated.
David.
Hi,
I couldn't find a way to update the config for es connection, where do I change localhost/port?
Thanks,
On line 383 in the BouncyTrait, we have the line ;
if (! $params['id']) {
This causes an error as the variable 'id' does not exist when saving a new model. A simple fix for this would be to change this to;
if (! isset($params['id'])) {
Thanks.
elasticsearch/elasticsearch package to v2
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.