Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
5e63985
WIP - Elasticsearch 9
niemyjski Apr 14, 2025
540a3eb
More 9.0 Work
niemyjski Apr 14, 2025
82865f8
More updates
niemyjski Apr 14, 2025
774f04e
Merge branch 'main' into feature/elastic-client
niemyjski Nov 30, 2025
9d74ed5
WIP - Needs review and cleanup before being merged into main branch
niemyjski Jan 2, 2026
8706c9f
Update ES to 9.3.1, enable local Parsers source reference, remove ves…
niemyjski Feb 27, 2026
87bdb07
Merge origin/main and adapt incoming changes for new Elastic client
niemyjski Feb 27, 2026
0b19cbf
Enforces minimum project version 8.0
niemyjski Feb 28, 2026
532a826
Adapts to new Elasticsearch client API changes
niemyjski Feb 28, 2026
5eb4c44
Merge pull request #215 from FoundatioFx/feature/elastic-client-opus-…
niemyjski Feb 28, 2026
70cb2ba
Fix dead code, restore feature parity, and complete ES9 upgrade
niemyjski Feb 28, 2026
fcf0036
Updates ElasticQueries parser dependency
niemyjski Feb 28, 2026
2238e58
Cleans up and refactors repository infrastructure
niemyjski Feb 28, 2026
be1ba5a
Address PR feedback, fix CI failures, and improve code quality
niemyjski Feb 28, 2026
343e2bb
Fix constant condition warning in ToFieldValue switch expression
niemyjski Feb 28, 2026
b8ce221
Audit fixes: perf regression, unskip tests, dead code, null safety, a…
niemyjski Feb 28, 2026
a405260
Fix critical Meta cast, paging cast, retry bounds, and code quality i…
niemyjski Feb 28, 2026
542b836
pr feedback
niemyjski Feb 28, 2026
05c01c7
Fix task error handling, transport ping failures, and add pipeline tests
niemyjski Feb 28, 2026
22ac272
pr feedback
niemyjski Feb 28, 2026
53ba805
Fix CI test failures, resource leaks, exception handling, and doc errors
niemyjski Mar 1, 2026
de32fac
Enables ingest pipelines for patch operations
niemyjski Mar 1, 2026
4ac4f00
Fix response validation, performance, and resource management issues
niemyjski Mar 1, 2026
95495e1
Merge fix/response-validation into feature/elastic-client
niemyjski Mar 1, 2026
6b2ff5b
Add PartialPatch null field limitation documentation (ES client #8763)
niemyjski Mar 1, 2026
7ccd5e0
Address PR #217 review feedback and fix ExistsAsync build failure
niemyjski Mar 1, 2026
69e6586
Merge fix/response-validation with PR #217 feedback fixes
niemyjski Mar 1, 2026
2ac33cd
Fix CI test failures and address PR review feedback
niemyjski Mar 1, 2026
cbb9510
Merge fix/response-validation: CI test fixes and PR review feedback
niemyjski Mar 1, 2026
5c64069
Standardize test naming to three-part convention and add AAA structure
niemyjski Mar 1, 2026
078ec7e
Address remaining PR review comments
niemyjski Mar 1, 2026
1d52c04
Merge fix/response-validation into feature/elastic-client
niemyjski Mar 1, 2026
5b3f3ac
Merge main (PR #217 squash) into feature/elastic-client
niemyjski Mar 1, 2026
02092c3
Fix code quality issues across repository and test infrastructure
niemyjski Mar 1, 2026
340f926
Merge branch 'fix/code-quality' into feature/elastic-client
niemyjski Mar 1, 2026
d767ea8
Validate op name in Operation.Build before creating operation
niemyjski Mar 1, 2026
4910cb8
Merge branch 'fix/code-quality' into feature/elastic-client
niemyjski Mar 1, 2026
3284d54
Use ArgumentException.ThrowIfNullOrWhiteSpace in Operation.Build
niemyjski Mar 1, 2026
4cd1a1d
Merge branch 'fix/code-quality' into feature/elastic-client
niemyjski Mar 2, 2026
d7dd80b
Merge remote-tracking branch 'origin/main' into feature/elastic-client
niemyjski Mar 2, 2026
4d5c826
Merge remote-tracking branch 'origin/main' into feature/elastic-client
niemyjski Mar 2, 2026
ff588a5
Improve code quality: serializer safety, FieldValue consistency, and …
niemyjski Mar 2, 2026
4cb5c23
Centralize serializer via DI and fix test/error-handling issues
niemyjski Mar 3, 2026
179523e
Merge remote-tracking branch 'origin/main' into feature/elastic-client
niemyjski Mar 3, 2026
b7ee538
Refines serialization and query value mapping
niemyjski Mar 3, 2026
acdc9e0
Fix argument validation, error handling, and exception correctness
niemyjski Mar 3, 2026
86f8da3
Merge branch 'fix/code-quality' into feature/elastic-client
niemyjski Mar 3, 2026
035ad7f
Remove redundant nameof in ThrowIfNullOrEmpty calls
niemyjski Mar 3, 2026
bd82ab4
Fix ES9 migration audit issues: analyzer merge, serializer options, p…
niemyjski Mar 3, 2026
a462281
Merge branch 'fix/code-quality' into feature/elastic-client
niemyjski Mar 3, 2026
d881c0f
Address review feedback: log levels, DI over statics, pattern matchin…
niemyjski Mar 3, 2026
3f1bc22
Fix ValueAs to prefer serializer for JsonNode/JsonElement paths
niemyjski Mar 3, 2026
f5082cb
Extract FieldValueHelper to shared utility, require serializer for JS…
niemyjski Mar 3, 2026
0d036d6
Make serializer required in ObjectValueAggregate.ValueAs
niemyjski Mar 3, 2026
921ce10
Merge remote-tracking branch 'origin/main' into feature/elastic-client
niemyjski Mar 3, 2026
d91ef81
Use ITextSerializer consistently, fix resource disposal, and improve …
niemyjski Mar 4, 2026
f2e7950
Consolidate serializers into Serialization namespace and eliminate sh…
niemyjski Mar 4, 2026
3c12e04
Add serialization converter test coverage and organize test structure
niemyjski Mar 4, 2026
241769c
Refine mapping documentation and improve serialization and aggregatio…
niemyjski Mar 4, 2026
5f146bf
Fix serialization correctness, data loss, and RFC compliance issues
niemyjski Mar 4, 2026
e6f4123
Improve double serialization precision and enhance JSON patch and agg…
niemyjski Mar 4, 2026
5d6009f
Address PR review comments: fix date-only string parsing and document…
niemyjski Mar 4, 2026
e65ca37
Use async search
niemyjski Mar 5, 2026
38c0faa
Fix bugs, improve robustness, and expand ES9 migration guide
niemyjski Mar 5, 2026
e6961d2
Add test coverage for bug fixes and fix LogErrorRequest format crash
niemyjski Mar 5, 2026
61f2ea8
Address PR review feedback: test naming, extension method, and format…
niemyjski Mar 5, 2026
8869558
Address follow-up PR feedback: source serializer, resilience policy, …
niemyjski Mar 5, 2026
7accd76
Rename {Error} to {Reason} in log templates when passing Error.Reason…
niemyjski Mar 5, 2026
2bc9b74
Make TimeSpanExtensions internal, add InternalsVisibleTo for test pro…
niemyjski Mar 5, 2026
281ff64
Merge main into feature/elastic-client after backport PR #222
niemyjski Mar 6, 2026
4ed1fd6
Handle IDictionary task status and improve ulong FieldValue conversion
niemyjski Mar 6, 2026
6ab33ab
Downgrade short term to Elastic 8 client so we can upgrade from nest …
niemyjski Mar 6, 2026
862b5b7
Merge remote-tracking branch 'origin/main' into feature/elastic-client
niemyjski Mar 6, 2026
95505fd
Port doc_count_error_upper_bound logging to feature/elastic-client
niemyjski Mar 6, 2026
947439b
Fix FieldConditionsQueryBuilder to consult per-query QueryFieldResolv…
niemyjski Mar 7, 2026
15d4fe3
Merge origin/main into feature/elastic-client
niemyjski Mar 7, 2026
f3ab739
Merge remote-tracking branch 'origin/main' into feature/elastic-client
niemyjski Mar 7, 2026
4c193ec
Merge origin/main into feature/elastic-client (PR #227 date tracking)
niemyjski Mar 7, 2026
8cdff51
Fix merge review: eliminate magic strings, update docs for elastic-cl…
niemyjski Mar 7, 2026
16036a1
Rename partial parameter to patch in ApplyDateTracking(PartialPatch) …
niemyjski Mar 7, 2026
de61f4a
Merge origin/main into feature/elastic-client
niemyjski Mar 7, 2026
c9776e2
Merge branch 'main' into feature/elastic-client
niemyjski Mar 7, 2026
8da4212
Merge main into feature/elastic-client (bulk error handling)
niemyjski Mar 8, 2026
7e513bd
Merge branch 'main' into feature/elastic-client
niemyjski Mar 9, 2026
389c3d8
dotnet format: remove unused usings
niemyjski Mar 9, 2026
4e458d1
Merge main into feature/elastic-client (PR #235: PatchAsync return st…
niemyjski Mar 9, 2026
759d20e
Merge main into feature/elastic-client (PR #236: AddRequiredField)
niemyjski Mar 10, 2026
3ede6ea
Merge main into feature/elastic-client (PR #237: AfterQuery hook)
niemyjski Mar 10, 2026
7f947ce
update to latest parsers
niemyjski Mar 10, 2026
2c88616
Merge branch 'main' into feature/elastic-client
niemyjski Mar 10, 2026
39cd5fd
Merge main into feature/elastic-client
niemyjski Mar 15, 2026
f9994bf
Merge branch 'main' into feature/elastic-client
niemyjski Mar 16, 2026
ab4204f
Update skill to reference ElasticsearchClient instead of IElasticClient
niemyjski Mar 16, 2026
3cef702
Set minimum-major-minor version to 8.0 in build workflow
niemyjski Mar 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .agents/skills/foundatio-repositories/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ description: >
aggregation queries, partial and script patches, and search-after pagination.
Apply when working with any IRepository, ISearchableRepository, FindAsync,
CountAsync, PatchAsync, PatchAllAsync, or RemoveAllAsync method. Never use
raw IElasticClient directly -- always use repository methods. Use context7
raw ElasticsearchClient directly -- always use repository methods. Use context7
MCP to fetch current API docs and examples.
---

# Foundatio Repositories

High-level Elasticsearch repository pattern for .NET. Interface-first, with built-in caching, messaging, patch operations, and soft deletes. **Never use raw `IElasticClient` directly** -- always use repository methods.
High-level Elasticsearch repository pattern for .NET. Interface-first, with built-in caching, messaging, patch operations, and soft deletes. **Never use raw `ElasticsearchClient` directly** -- always use repository methods.

## Documentation via context7

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ jobs:
secrets: inherit
with:
new-test-runner: true
minimum-major-minor: '8.0'
22 changes: 1 addition & 21 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,4 @@ _NCrunch_*
.DS_Store

# Rider

# User specific
**/.idea/**/workspace.xml
**/.idea/**/tasks.xml
**/.idea/shelf/*
**/.idea/dictionaries

# Sensitive or high-churn files
**/.idea/**/dataSources/
**/.idea/**/dataSources.ids
**/.idea/**/dataSources.xml
**/.idea/**/dataSources.local.xml
**/.idea/**/sqlDataSources.xml
**/.idea/**/dynamic.xml

# Rider
# Rider auto-generates .iml files, and contentModel.xml
**/.idea/**/*.iml
**/.idea/**/contentModel.xml
**/.idea/**/modules.xml
**/.idea/copilot/chatSessions/
.idea/
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ samples
- **Guard clauses**: Use `ArgumentNullException.ThrowIfNull(param)` instead of manual `if (param == null) throw`
- **Lambda bodies**: Prefer multi-line bodies for lambda expressions—no single-line `{ action(); return true; }` patterns
- **Raw string literals**: Use `"""..."""` for multi-line strings. Never use string concatenation (`+`) to build script or query strings
- **Domain-correct syntax in scripts**: Verify operator syntax for the target language (e.g., Painless uses `==` not `===`; NEST uses specific query DSL methods)
- **Domain-correct syntax in scripts**: Verify operator syntax for the target language (e.g., Painless uses `==` not `===`; Elasticsearch client uses specific query DSL methods)

### Architecture Patterns

Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,15 @@ public sealed class EmployeeIndex : VersionedIndex<Employee>
public EmployeeIndex(IElasticConfiguration configuration)
: base(configuration, "employees", version: 1) { }

public override TypeMappingDescriptor<Employee> ConfigureIndexMapping(
TypeMappingDescriptor<Employee> map)
public override void ConfigureIndexMapping(TypeMappingDescriptor<Employee> map)
{
return map
.Dynamic(false)
map
.Dynamic(DynamicMapping.False)
.Properties(p => p
.SetupDefaults()
.Text(f => f.Name(e => e.Name).AddKeywordAndSortFields())
.Text(f => f.Name(e => e.Email).AddKeywordAndSortFields())
.Number(f => f.Name(e => e.Age).Type(NumberType.Integer))
.Text(e => e.Name, t => t.AddKeywordAndSortFields())
.Text(e => e.Email, t => t.AddKeywordAndSortFields())
.IntegerNumber(e => e.Age)
);
}
}
Expand Down
3 changes: 2 additions & 1 deletion build/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
<Description>Generic Repository implementations for Elasticsearch.</Description>
<PackageProjectUrl>https://github.com/FoundatioFx/Foundatio.Repositories</PackageProjectUrl>
<PackageReleaseNotes>https://github.com/FoundatioFx/Foundatio.Repositories/releases</PackageReleaseNotes>
<MinVerMinimumMajorMinor>8.0</MinVerMinimumMajorMinor>
<MinVerSkip Condition="'$(Configuration)' == 'Debug'">true</MinVerSkip>
<MinVerTagPrefix>v</MinVerTagPrefix>
<ReferenceFoundatioSource Condition="$(SolutionName.Contains('All')) Or !$(SolutionName.Contains('Foundatio'))">true</ReferenceFoundatioSource>
<ReferenceFoundatioRepositoriesSource>false</ReferenceFoundatioRepositoriesSource>
<ReferenceFoundatioRepositoriesSource Condition="$(SolutionName.Contains('All')) Or !$(SolutionName.Contains('Foundatio'))">true</ReferenceFoundatioRepositoriesSource>
<FoundatioProjectsDir>$(ProjectDir)..\..\..\</FoundatioProjectsDir>

<Copyright>Copyright © $([System.DateTime]::Now.ToString(yyyy)) Foundatio. All rights reserved.</Copyright>
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.19.11
image: docker.elastic.co/elasticsearch/elasticsearch:9.3.1
environment:
discovery.type: single-node
xpack.security.enabled: "false"
Expand All @@ -20,7 +20,7 @@ services:
depends_on:
elasticsearch:
condition: service_healthy
image: docker.elastic.co/kibana/kibana:8.19.11
image: docker.elastic.co/kibana/kibana:9.3.1
environment:
xpack.security.enabled: "false"
ports:
Expand Down
1 change: 1 addition & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export default withMermaid(
{ text: 'Jobs', link: '/guide/jobs' },
{ text: 'Custom Fields', link: '/guide/custom-fields' },
{ text: 'Troubleshooting', link: '/guide/troubleshooting' },
{ text: 'Upgrading to ES9', link: '/guide/upgrading-to-es9' },
],
},
],
Expand Down
19 changes: 9 additions & 10 deletions docs/guide/custom-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,16 +177,15 @@ public sealed class EmployeeIndex : VersionedIndex<Employee>
AddStandardCustomFieldTypes();
}

public override TypeMappingDescriptor<Employee> ConfigureIndexMapping(
TypeMappingDescriptor<Employee> map)
public override void ConfigureIndexMapping(TypeMappingDescriptor<Employee> map)
{
return map
.Dynamic(false)
map
.Dynamic(DynamicMapping.False)
.Properties(p => p
.SetupDefaults()
.Keyword(f => f.Name(e => e.Id))
.Keyword(f => f.Name(e => e.CompanyId))
.Text(f => f.Name(e => e.Name))
.Keyword(e => e.Id)
.Keyword(e => e.CompanyId)
.Text(e => e.Name)
);
}
}
Expand Down Expand Up @@ -417,7 +416,7 @@ public interface ICustomFieldType
string Type { get; }
Task<ProcessFieldValueResult> ProcessValueAsync<T>(
T document, object value, CustomFieldDefinition fieldDefinition) where T : class;
IProperty ConfigureMapping<T>(SingleMappingSelector<T> map) where T : class;
Func<PropertyFactory<T>, IProperty> ConfigureMapping<T>() where T : class;
}

public class ProcessFieldValueResult
Expand Down Expand Up @@ -453,9 +452,9 @@ public class PercentFieldType : ICustomFieldType
return Task.FromResult(new ProcessFieldValueResult { Value = value });
}

public IProperty ConfigureMapping<T>(SingleMappingSelector<T> map) where T : class
public Func<PropertyFactory<T>, IProperty> ConfigureMapping<T>() where T : class
{
return map.Number(n => n.Type(NumberType.Integer));
return factory => factory.IntegerNumber();
}
}
```
Expand Down
Loading
Loading