# |
Jul 10th 2018, 10:08 |
josbeir |
@lorenzo you forgot the 'refresh' option in the changelog :P |
# |
Jul 10th 2018, 10:08 |
james.phillips |
painful to upgrade to 3.6 from 3.5? |
# |
Jul 10th 2018, 10:08 |
josbeir |
best test with cake 3.6 and 2.0 branch |
# |
Jul 10th 2018, 10:07 |
james.phillips |
my fault... |
# |
Jul 10th 2018, 10:07 |
josbeir |
i assumed you where using the 2.0 branch |
# |
Jul 10th 2018, 10:07 |
james.phillips |
my fault. |
# |
Jul 10th 2018, 10:07 |
james.phillips |
ahhhh I hate computers |
# |
Jul 10th 2018, 10:07 |
josbeir |
sorry about that |
# |
Jul 10th 2018, 10:07 |
josbeir |
ok then you can use the old docs |
# |
Jul 10th 2018, 10:06 |
josbeir |
fuck sake :) |
# |
Jul 10th 2018, 10:06 |
josbeir |
thats the 1.x branch |
# |
Jul 10th 2018, 10:06 |
josbeir |
ah ok wait |
# |
Jul 10th 2018, 10:06 |
james.phillips |
"cakephp/elastic-search": "@stable" in composer json |
# |
Jul 10th 2018, 10:06 |
josbeir |
ah you want to compare the entire entity probably |
# |
Jul 10th 2018, 10:06 |
josbeir |
firstMatch() ? |
# |
Jul 10th 2018, 10:05 |
neon1024 |
What’s the quickest way to see if an entity value exists in an array of Entities? I’ve tried Collection::contains() but doesn’t seem to cut it |
# |
Jul 10th 2018, 10:05 |
josbeir |
it uses the new Plugin style |
# |
Jul 10th 2018, 10:05 |
josbeir |
2.0 is for 3.6+ |
# |
Jul 10th 2018, 10:05 |
james.phillips |
I have cake 3.5.5 |
# |
Jul 10th 2018, 10:04 |
josbeir |
its still up 2 date for saving and retrieving :slightly_smiling_face: |
# |
Jul 10th 2018, 10:04 |
josbeir |
check out the readme on git, ignore the setup part in the cake docs |
# |
Jul 10th 2018, 10:04 |
josbeir |
you are using the old plugin loading way |
# |
Jul 10th 2018, 10:04 |
josbeir |
in Application.php |
# |
Jul 10th 2018, 10:04 |
josbeir |
you need to use $this->addPlugin |
# |
Jul 10th 2018, 10:03 |
josbeir |
no |
# |
Jul 10th 2018, 10:03 |
james.phillips |
Plugin::load('Cake/ElasticSearch', ['bootstrap' => true]); |
# |
Jul 10th 2018, 10:03 |
josbeir |
or use IndexRegistry::get('Comments'); |
# |
Jul 10th 2018, 10:03 |
james.phillips |
ive added elastic plugin |
# |
Jul 10th 2018, 10:03 |
josbeir |
and indeed @james.phillips you need to add elastic :P |
# |
Jul 10th 2018, 10:03 |
lorenzo |
`$this->loadModel('Comments', 'elastic');` Load the `CommentsIndex` model from the `elastic` datasource |
# |
Jul 10th 2018, 10:03 |
james.phillips |
makes sense and that matchs my datasource name I added in my config |
# |
Jul 10th 2018, 10:03 |
josbeir |
@lorenzo thanks ! |
# |
Jul 10th 2018, 10:02 |
james.phillips |
so loadmodel elastic = datasource elastic |
# |
Jul 10th 2018, 10:01 |
james.phillips |
Im guessing i missed a step |
# |
Jul 10th 2018, 10:01 |
james.phillips |
theres where I grabbed the code from ... so when I add the following code to my existing controller I get that error message public function initialize() { parent::initialize(); $this->loadModel('Comments', 'elastic'); } |
# |
Jul 10th 2018, 10:01 |
lorenzo |
@josbeir https://github.com/cakephp/elastic-search/releases/tag/2.0.0-RC2 |
# |
Jul 10th 2018, 09:58 |
lorenzo |
read here https://github.com/cakephp/elastic-search#getting-a-index-object |
# |
Jul 10th 2018, 09:57 |
lorenzo |
`'elastic'` is not a model, it is a datasource |
# |
Jul 10th 2018, 09:56 |
james.phillips |
thank god for source control software to remind me what random stuff ive done |
# |
Jul 10th 2018, 09:55 |
james.phillips |
i still had $this->loadModel('elastic'); in my code from some other doc |
# |
Jul 10th 2018, 09:53 |
josbeir |
you are trying to retrieve a record or ? |