Skip to content

(#78) Elasticsearch 8 update#82

Draft
blairlearn wants to merge 1 commit into
developfrom
ticket/78-es8
Draft

(#78) Elasticsearch 8 update#82
blairlearn wants to merge 1 commit into
developfrom
ticket/78-es8

Conversation

@blairlearn
Copy link
Copy Markdown
Contributor

@blairlearn blairlearn commented Apr 13, 2026

  • Replace NEST client with Elastic.Clients.Elasticsearch.

  • Migrate from Newtonsoft.Json to System.Text.Json.

  • Refactored serialization:

    • Deserializing from Elasticsearch to POCO uses JsonNamingPolicy.SnakeCaseLower via
      NCI.OCPL.Api.Common NuGet component.
    • Serializing from POCO to the wire uses default .Net naming policy with overrides
      as needed.
    • Model classes migrated from NEST mapping attributes ([Keyword], [Number], [Nested]).
  • Tests:

    • Test mocking migrated to TestingElasticsearchClientSettingsFactory in order
      to use the same ElasticsearchClientSettings initialization as executable code.
    • Refactor test connection classes for simplicity.
    • Modify expected query structure JSON files updated to match ES 8 serialization changes
      (e.g. arrays with only one element become objects).
    • Switch tests from async void to async Task.
  • Project file updates

    • Target framework corrected from netcoreapp8.0 to net8.0.
    • Bump NCI.OCPL.Api.Common packages to 4.0.0.
    • Remove explicit NSwag dependency
  • Miscellaneous

    • Cleaned up using statements across many files.
    • Correct typos.

@blairlearn blairlearn force-pushed the ticket/78-es8 branch 3 times, most recently from 02af708 to ba99fbe Compare April 24, 2026 18:30
@blairlearn blairlearn force-pushed the ticket/78-es8 branch 4 times, most recently from 003d637 to b3daf85 Compare May 27, 2026 15:40
- Replace NEST client with Elastic.Clients.Elasticsearch.

- Migrate from Newtonsoft.Json to System.Text.Json.

- Refactored serialization:

  - Deserializing from Elasticsearch to POCO uses JsonNamingPolicy.SnakeCaseLower via
    NCI.OCPL.Api.Common NuGet component.
  - Serializing from POCO to the wire uses default .Net naming policy with overrides
    as needed.
  - Model classes migrated from NEST mapping attributes ([Keyword], [Number], [Nested]).

- Tests:

  - Test mocking migrated to TestingElasticsearchClientSettingsFactory in order
    to use the same ElasticsearchClientSettings initialization as executable code.
  - Refactor test connection classes for simplicity.
  - Modify expected query structure JSON files to match ES 8 serialization changes
    (e.g. arrays with only one element become objects).
  - Switch tests from async void to async Task.

- Project file updates

  - Target framework corrected from netcoreapp8.0 to net8.0.
  - Bump NCI.OCPL.Api.Common packages to 4.0.0.
  - Remove explicit NSwag dependency

- Miscellaneous

  - Cleaned up using statements across many files.
  - Update location for NIH TLS certificates.
  - Correct typos.

Closes #78
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.

1 participant