@devisfuture/mega-collection 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +35 -33
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -251,17 +251,17 @@ Unified facade that composes all three engines around a shared dataset.
251
251
 
252
252
  **Methods:**
253
253
 
254
- | Method | Description |
255
- | ----------------------------------- | ------------------------------------------------------------------- |
256
- | `search(query)` | Search all indexed fields |
257
- | `search(field, query)` | Search a specific field |
258
- | `sort(descriptors)` | Sort using stored dataset |
259
- | `sort(data, descriptors, inPlace?)` | Sort with an explicit dataset |
260
- | `filter(criteria)` | Filter using stored dataset |
261
- | `filter(data, criteria)` | Filter with an explicit dataset |
262
- | `data(data)` | Replace stored dataset for all imported modules |
263
- | `clearIndexes(module)` | Clear indexes for one module (`"search"`, `"sort"`, `"filter"`) |
264
- | `clearData(module)` | Clear stored data for one module (`"search"`, `"sort"`, `"filter"`) |
254
+ | Method | Description |
255
+ | ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
256
+ | `search(query)` | Search all indexed fields |
257
+ | `search(field, query)` | Search a specific field |
258
+ | `sort(descriptors)` | Sort using stored dataset |
259
+ | `sort(data, descriptors, inPlace?)` | Sort with an explicit dataset |
260
+ | `filter(criteria)` | Filter using stored dataset |
261
+ | `filter(data, criteria)` | Filter with an explicit dataset |
262
+ | `data(data)` | Replace stored dataset for all imported modules, rebuilding configured indexes and resetting filter state where applicable |
263
+ | `clearIndexes(module)` | Clear indexes for one module (`"search"`, `"sort"`, `"filter"`) |
264
+ | `clearData(module)` | Clear stored data for one module (`"search"`, `"sort"`, `"filter"`) |
265
265
 
266
266
  ---
267
267
 
@@ -269,13 +269,13 @@ Unified facade that composes all three engines around a shared dataset.
269
269
 
270
270
  Trigram-based text search engine.
271
271
 
272
- | Method | Description |
273
- | ---------------------- | --------------------------------------- |
274
- | `search(query)` | Search all indexed fields, deduplicated |
275
- | `search(field, query)` | Search a specific indexed field |
276
- | `data(data)` | Replace stored dataset |
277
- | `clearIndexes()` | Clear n-gram indexes |
278
- | `clearData()` | Clear stored data |
272
+ | Method | Description |
273
+ | ---------------------- | ----------------------------------------------------- |
274
+ | `search(query)` | Search all indexed fields, deduplicated |
275
+ | `search(field, query)` | Search a specific indexed field |
276
+ | `data(data)` | Replace stored dataset and rebuild configured indexes |
277
+ | `clearIndexes()` | Clear n-gram indexes |
278
+ | `clearData()` | Clear stored data |
279
279
 
280
280
  ### `FilterEngine<T>` (filter module)
281
281
 
@@ -287,29 +287,31 @@ Constructor option highlights:
287
287
  | ------------------------ | --------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
288
288
  | `filterByPreviousResult` | `boolean` | When `true`, each `filter(criteria)` call filters from previous result. Defaults to `false` (each call starts from the original dataset). |
289
289
 
290
- | Method | Description |
291
- | ------------------------ | ---------------------------------------------------- |
292
- | `filter(criteria)` | Filter using stored dataset |
293
- | `filter(data, criteria)` | Filter with an explicit dataset |
294
- | `data(data)` | Replace stored dataset |
295
- | `resetFilterState()` | Reset previous-result state for sequential filtering |
296
- | `clearIndexes()` | Free all index memory |
297
- | `clearData()` | Clear stored data |
290
+ | Method | Description |
291
+ | ------------------------ | -------------------------------------------------------------------------- |
292
+ | `filter(criteria)` | Filter using stored dataset |
293
+ | `filter(data, criteria)` | Filter with an explicit dataset |
294
+ | `data(data)` | Replace stored dataset, rebuild configured indexes, and reset filter state |
295
+ | `resetFilterState()` | Reset previous-result state for sequential filtering |
296
+ | `clearIndexes()` | Free all index memory |
297
+ | `clearData()` | Clear stored data |
298
298
 
299
299
  ### `SortEngine<T>` (sort module)
300
300
 
301
301
  Sorting with pre-compiled comparators and cached sort indexes.
302
302
 
303
- | Method | Description |
304
- | ----------------------------------- | ----------------------------- |
305
- | `sort(descriptors)` | Sort using stored dataset |
306
- | `sort(data, descriptors, inPlace?)` | Sort with an explicit dataset |
307
- | `data(data)` | Replace stored dataset |
308
- | `clearIndexes()` | Free all cached indexes |
309
- | `clearData()` | Clear stored data |
303
+ | Method | Description |
304
+ | ----------------------------------- | ----------------------------------------------------- |
305
+ | `sort(descriptors)` | Sort using stored dataset |
306
+ | `sort(data, descriptors, inPlace?)` | Sort with an explicit dataset |
307
+ | `data(data)` | Replace stored dataset and rebuild configured indexes |
308
+ | `clearIndexes()` | Free all cached indexes |
309
+ | `clearData()` | Clear stored data |
310
310
 
311
311
  ---
312
312
 
313
+ **Note on `data` method:** Calling the `data` method automatically rebuilds configured indexes and resets any internal state (such as filter state in FilterEngine), so it is sufficient on its own without needing to call `clearIndexes` separately.
314
+
313
315
  ## Types
314
316
 
315
317
  All types are exported from the root package and from each sub-module:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devisfuture/mega-collection",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "High-performance search, filter & sort engine for 100K+ item collections in JavaScript/TypeScript",
5
5
  "exports": {
6
6
  ".": {