Chuangbo Li
Chuangbo Li
@ewall This hack seems not work any more after meteor 0.9.0 and iron:router 0.9.1?
Sorry this hack works well with meteor 0.9.0. In my case which just broken, I used a pause() in a onBeforeAction callback, it prevents the onAfterAction. That's the reason. Sorry.
You can try either: Eager load relations ``` php YourModel::with('the_relation')->get()->addToIndex() ``` or https://github.com/elasticquent/Elasticquent#document-data ``` php function getIndexDocumentData() { return [ 'id' => $this->id, 'title' => $this->title, 'custom' => 'variable', ];...
@AlexLove77 Thanks. `all()` is is typo too.
Sorry for the late response. Could you please show us what your model looks like and how do you add them into index?
@yaofong Could you please show us what your model looks like and how do you add them into index too?
@yaofong Thank you. Also would you please tell me the output for code below ``` php $tour = Tour::select('id','type','over_title','over_country_id',...) ->with(array( 'country' => function($query) { $query->addSelect(array('id','name')); }, 'cities' => function($query) {...
Can we run a docker elasticsearch container for mocking data? Update: Just noticed elasticsearch-php use Mockery.
@timgws Yes I'm using dev-master. laravel/framework version: `v5.2.29` ``` php \App\Product::search('test')->map(function() {}) PHP error: Undefined index: took in /app/vendor/elasticquent/elasticquent/src/ElasticquentResultCollection.php on line 24 ```
Elasticsearch: 2.2.1 elasticsearch-php: 2.0.3 Just found [this fork](https://github.com/clowdy/Elasticquent/blob/improvements/src/ElasticquentResultCollection.php#L20) has implemented the similar proposal. Do you mind me to semi-cherry-pick to here?