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

API v2 support with new fields #231

Merged
merged 168 commits into from
Sep 26, 2024
Merged

API v2 support with new fields #231

merged 168 commits into from
Sep 26, 2024

Conversation

techgique
Copy link
Member

No description provided.

jduss4 and others added 30 commits May 20, 2022 10:28
in order to achieve support for multiple ES schemas
- adds configuration for different schema locations
- moves code from executables into Datura::Elasticsearch module
- Datura::Options combines settings into schema path
had suffered from errors and from gem deprecation warnings
the validator ensures that all fields have either an exact
mapping OR match a dynamic template, at least as far as our
current simple dynamic templates go. This may need to be adjusted
in the future if we start using more complex templates

refactors file_type post_es method to use Elasticsearch::Index
object and to rely less on repeated "returns" vs a final line at the end

also adds some helpful methods like should_post? to complement
should_transform? for ease
that is, previously it was assuming that nested subfields all
match a top level field or dynamic mapping
actually, nested fields can specify their own specific mapping
that the subfields may also access....sooooooo I had to redo stuff

tests should be passing! thank goodness for unit tests and tdd
reverts my earlier change, it breaks other functions
update documentation for changes to the schema
in order to achieve support for multiple ES schemas
- adds configuration for different schema locations
- moves code from executables into Datura::Elasticsearch module
- Datura::Options combines settings into schema path
the validator ensures that all fields have either an exact
mapping OR match a dynamic template, at least as far as our
current simple dynamic templates go. This may need to be adjusted
in the future if we start using more complex templates

refactors file_type post_es method to use Elasticsearch::Index
object and to rely less on repeated "returns" vs a final line at the end

also adds some helpful methods like should_post? to complement
should_transform? for ease
@techgique techgique self-assigned this Aug 28, 2024
Copy link
Member Author

@techgique techgique left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub won't let me mark this as requiring changes because I re-made the PR myself. But please look over my review comments.

Also there are several tests failing or erroring when I run rake test from this repository.

34 runs, 76 assertions, 11 failures, 3 errors, 0 skips

We don't necessarily have to fix those on this PR. That work can be a separate PR outside of this, but I definitely want them fixed before we make a 2.0 release. That work might turn up other bugs we haven't noticed or it could just be differences between v1 and v2 API behavior.

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
datura.gemspec Outdated Show resolved Hide resolved
docs/4_developers/installation.md Outdated Show resolved Hide resolved
lib/datura/elasticsearch/alias.rb Show resolved Hide resolved
lib/datura/elasticsearch/index.rb Show resolved Hide resolved
lib/datura/to_es/pdf_to_es/fields.rb Outdated Show resolved Hide resolved
Gemfile Outdated Show resolved Hide resolved
CHANGELOG.md Outdated
@@ -65,7 +61,11 @@ See new schema (2.0) documentation [here](https://github.com/CDRH/datura/docs/sc

### Migration
- check to make sure "text" xpath is doing desired behavior
- use Elasticsearch 8.5 or higher and add authentication as described above if security is enabled. See [dev docs instructions](https://github.com/CDRH/cdrh_dev_docs/blob/update_elasticsearch_documentation/publishing/2_basic_requirements.md#downloading-elasticsearch).
- use Elasticsearch 8.5 or higher and add authentication as described above if security is enabled. Add the following to `public.yml` or `private.yml` in the data repo:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revise the text here to reflect that one doesn't need to look above for the auth info now.

@techgique techgique merged commit e1498c7 into dev Sep 26, 2024
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

Successfully merging this pull request may close these issues.

4 participants