Skip to content

(#78) Elasticsearch 8 update#82

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

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

Conversation

@blairlearn
Copy link
Copy Markdown
Contributor

@blairlearn blairlearn commented Apr 13, 2026

  1. Elasticsearch client migration

    • Replace NEST / Elasticsearch.Net with Elastic.Clients.Elasticsearch (ElasticsearchClient).
    • Rework query building to use explicit BookQuery and Must / Should clauses (replaces
      NEST's discontinued operator-composed queries).
  2. JSON Serialization Migration (Newtonsoft.Json --> System.Text.Json)

    • Replace NEST mapping attributes with JsonPropertyName.
  3. Package & Project Updates

    • Target framework corrected from netcoreapp8.0 to net8.0.
    • NEST 7.9.* --> Elastic.Clients.Elasticsearch 8.19.12.
    • NCI.OCPL.Api.Common updated from 3.0.1 to 4.0.0.
    • Test packages updated (coverlet, Moq versions).
  4. Infrastructure & Docker

    • Elasticsearch Docker image updated from 7.17.28 to 8.19.12.
    • Docker compose adds security-off settings (xpack.security.enabled=false) for local testing.
  5. Test overhaul

    • Test mocking migrated to TestingElasticsearchClientSettingsFactory to use the same
      ElasticsearchClientSettings initialization as executable code.
    • Refactor client mocking/construction.
  6. Misc

Closes #78

@blairlearn blairlearn force-pushed the ticket/78-es8 branch 2 times, most recently from 402a473 to 02af708 Compare April 24, 2026 13:47
1. Elasticsearch client migration
   - Replace NEST / Elasticsearch.Net with Elastic.Clients.Elasticsearch (ElasticsearchClient).
   - Rework query building to use explicit BookQuery and Must / Should clauses (replaces
     NEST's discontinued operator-composed queries).

2. JSON Serialization Migration (Newtonsoft.Json --> System.Text.Json)
   - Replace NEST mapping attributes with JsonPropertyName.

3. Package & Project Updates
   - Target framework corrected from netcoreapp8.0 to net8.0.
   - NEST 7.9.* --> Elastic.Clients.Elasticsearch 8.19.12.
   - NCI.OCPL.Api.Common updated from 3.0.1 to 4.0.0.
   - Test packages updated (coverlet, Moq versions).

4. Infrastructure & Docker
   - Elasticsearch Docker image updated from 7.17.28 to 8.19.12.
   - Docker compose adds security-off settings (xpack.security.enabled=false) for local testing.

5. Test overhaul
   - Test mocking migrated to TestingElasticsearchClientSettingsFactory to use the same
     ElasticsearchClientSettings initialization as executable code.
   - Refactor client mocking/construction.

6. Misc

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.

Enabler: Update Best Bets to Elasticsearch 8

1 participant