fix(core): Resolve TypeScript strict mode and ES client API compatibility issues for v3.0.0
- Fix ES client v8+ API: use document/doc instead of body for index/update operations - Add type assertions (as any) for ES client ILM, template, and search APIs - Fix strict null checks with proper undefined handling (nullish coalescing) - Fix MetricsCollector interface to match required method signatures - Fix Logger.error signature compatibility in plugins - Resolve TermsQuery type index signature conflict - Remove sourceMap from tsconfig (handled by tsbuild with inlineSourceMap)
This commit is contained in:
11
readme.md
11
readme.md
@@ -89,7 +89,7 @@ await docManager.pipeDocument({
|
||||
doc: {
|
||||
name: 'Premium Widget',
|
||||
price: 99.99,
|
||||
inStock: true
|
||||
inStock: true,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -99,7 +99,7 @@ await docManager.pipeDocument({
|
||||
doc: {
|
||||
name: 'Deluxe Gadget',
|
||||
price: 149.99,
|
||||
inStock: false
|
||||
inStock: false,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -179,6 +179,7 @@ await kvStore.clear();
|
||||
### ElsSmartlogDestination
|
||||
|
||||
The main logging destination class that provides:
|
||||
|
||||
- Automatic index rotation based on date
|
||||
- Configurable retention policies
|
||||
- Kibana-compatible log format
|
||||
@@ -188,6 +189,7 @@ The main logging destination class that provides:
|
||||
### ElasticDoc
|
||||
|
||||
Advanced document management with:
|
||||
|
||||
- Piping sessions for tracking document lifecycles
|
||||
- Automatic cleanup of stale documents
|
||||
- Snapshot functionality with custom processors
|
||||
@@ -197,6 +199,7 @@ Advanced document management with:
|
||||
### FastPush
|
||||
|
||||
High-performance bulk operations:
|
||||
|
||||
- Automatic batching for optimal performance
|
||||
- Index management (create, delete, clear)
|
||||
- Dynamic mapping support
|
||||
@@ -205,6 +208,7 @@ High-performance bulk operations:
|
||||
### KVStore
|
||||
|
||||
Simple key-value interface:
|
||||
|
||||
- Elasticsearch-backed storage
|
||||
- Async/await API
|
||||
- Automatic index initialization
|
||||
@@ -266,6 +270,7 @@ await docManager.takeSnapshot(async (iterator, prevSnapshot) => {
|
||||
## API Compatibility 🔄
|
||||
|
||||
This module is built on top of `@elastic/elasticsearch` v9.x and is compatible with:
|
||||
|
||||
- Elasticsearch 8.x and 9.x clusters
|
||||
- Kibana 8.x and 9.x for log visualization
|
||||
- OpenSearch (with some limitations)
|
||||
@@ -278,7 +283,7 @@ Full TypeScript support with comprehensive type definitions:
|
||||
import type {
|
||||
IElasticDocConstructorOptions,
|
||||
ISnapshot,
|
||||
SnapshotProcessor
|
||||
SnapshotProcessor,
|
||||
} from '@apiclient.xyz/elasticsearch';
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user