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

Move elasticsearch schemas to json #3263

merged 10 commits into from May 31, 2018


Copy link

@notbakaneko 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

Copy link

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.

Copy link
Collaborator Author

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

@nanaya nanaya merged commit a636508 into ppy:master May 31, 2018
@notbakaneko notbakaneko deleted the feature/es-json-schema branch June 13, 2018 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants