-
Notifications
You must be signed in to change notification settings - Fork 188
Move the index mapping definitions to standalone json files #526
Move the index mapping definitions to standalone json files #526
Conversation
" }"+ | ||
" }" + | ||
"}"; | ||
String mappingFile = "mappings/phrase_index_mapping.json"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all the method have almost same implementation, the only different is mappingFile name, could you simply it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the review! I made a function to make logic and error handling common.
Also found fileToString
method in TestUtils, so i stopped using Resources and used that method.
Thanks for the change. |
d2e7491
to
b73ad70
Compare
Sure, But I found a lot of differences between master branch and develop branch, and there are three different |
Thanks for the changes! We are migrating the SQL codebase to a new architecture so there are still some pending changes, sorry to make you confused. We will clean up redundant codelines/files in the future. For the index mapping methods, only But it looks like you are making changes in the one under |
Thank you for the detailed information! Now I understood what should I do! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the changes!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! As what I see, we're just adding test index mapping to new JSON files. So we need to make our test util start using these files in future?
@dai-chen Thanks for reviewing! I've already changed code at TestUtils.java to use these new json files. Is that enough change? or if it's not, I can make more change as needed ! |
I may miss something but I only see the |
Hi Chen @dai-chen , there are too many code lines removed in |
Yeah, I missed that and thought the whole file was removed :) Thanks! |
Issue #, if available: #138
Description of changes:
Move the test index mapping definition, which directly written in code, to standalone json files.
Name of these json files are made referring to the function name.
I referred this code to load each json file placed in `resources/mappings/**'
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.