Elastica
Elastica copied to clipboard
Migration 2.8 to 5.3 Help!
Hello! I'm new to elasticSearch and I'm migrating "elastic" from 2.8 to 5.3.3 if I'm having a hard time switching filtered (), filter () to a filter query. if you have a migration tutorial it would be fantastic if not a little help thanks.
`$qB = new QueryBuilder();
$query = $qB->query()->match_all();
$filter = $qB->filter()->bool() ->addMust($qB->filter()->type('article')) ->addMust($qB->filter()->term(['status' => true]));
$finalQuery = $qB->query()->filtered($query, $filter);`
Please help!
There is no version 2.8? For example queries best have a look at the Elastica testsuite.
@ruflin is that I do not know much about the migration process from v2.x to v5.x. so I asked for your help to change just that consult the new version. if it would be so kind on your part. I know it is not your job but to whom I could ask more than the project leader. : D
I think we need a bit more background here. What is the Exact version of Elastica you are using and want to use and the same for Elasticsearch. Do you already have a plan on the Elasticsearch migration? In any case have a look at https://www.elastic.co/guide/en/elasticsearch/reference/5.2/setup-upgrade.html
@ruflin if the version of elasticSearch is vs2.3.4 and the elastic version is 3.2.3 which I want to migrate to elasticSearch 5.x and elastic 5.x
Like the filter script migration: $ elasticFilter = $ qB-> filter () -> script ($ script); they are questions that I would like to help me since I am a newbie with elasticSearch
Basically everything has become a query, so you need to convert you filters to queries. See here for some bool examples: https://github.com/ruflin/Elastica/blob/master/test/Elastica/Query/BoolQueryTest.php