Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration 2.8 to 5.3 Help! #1597

Open
EliuFlorez opened this issue Jan 25, 2019 · 5 comments
Open

Migration 2.8 to 5.3 Help! #1597

EliuFlorez opened this issue Jan 25, 2019 · 5 comments

Comments

@EliuFlorez
Copy link

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!

@ruflin
Copy link
Owner

ruflin commented Jan 30, 2019

There is no version 2.8? For example queries best have a look at the Elastica testsuite.

@EliuFlorez
Copy link
Author

@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

@ruflin
Copy link
Owner

ruflin commented Feb 6, 2019

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

@EliuFlorez
Copy link
Author

@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

@ruflin
Copy link
Owner

ruflin commented Feb 7, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants