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

Move elasticsearch schemas to json #3263

Merged
merged 10 commits into from May 31, 2018

Conversation

3 participants
@notbakaneko
Contributor

notbakaneko commented May 24, 2018

To better align with directly dumping/loading the schema with elasticsearch. It's a bit easier to do development for new indices if we can just deal with json.

Also disable dynamic field creation.

can just create an index with something like
curl -XPUT -H 'Content-Type: application/json' "http://localhost:9200/i_r_new_index" -d @config/schemas/schema.json

@nanaya

This comment has been minimized.

Collaborator

nanaya commented May 24, 2018

Maybe a better example than creating index? Because it's currently just Model::esCreateIndex('indexname') which seems easier than curl ...

Also json can't have comment 😞 And hard to read, even worse than yaml because of all the extra fluffs.

@notbakaneko

This comment has been minimized.

Contributor

notbakaneko commented May 24, 2018

When constantly changing index settings under development, needing only to work with json and directly with elasticsearch is a lot simpler that doing it through php.
It also means not having to rely on Laravel for loading larger datasets like scores, so we can find faster ways to populate large indices.

Elasticsearch supports comments in json; if only json_decode also did ☹️

Model::esCreateIndex isn't going away either

@peppy peppy added this to the May 2018 milestone May 25, 2018

@nanaya

nanaya approved these changes May 31, 2018

@nanaya nanaya merged commit a636508 into ppy:master May 31, 2018

2 checks passed

continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@notbakaneko notbakaneko deleted the notbakaneko:feature/es-json-schema branch Jun 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment