| #
06053dca |
| 10-Apr-2026 |
Andreas Gohr <andi@splitbrain.org> |
SearchIndex: remove write side effect from retrieveRow()
retrieveRow() padded the index file when the requested RID was beyond the current length. This was an optimization for subsequent changeRow()
SearchIndex: remove write side effect from retrieveRow()
retrieveRow() padded the index file when the requested RID was beyond the current length. This was an optimization for subsequent changeRow() calls, but changeRow() already handles padding on its own. The side effect was also inconsistent with retrieveRows() which is a pure read.
Added a cross-index integration test verifying RID consistency across entity, token, frequency and reverse indexes when multiple entities share tokens.
show more ...
|
| #
9369b4a9 |
| 08-Apr-2026 |
Andreas Gohr <andi@splitbrain.org> |
SearchIndex: rector, phpcs, type hint fixes
|
| #
db8be586 |
| 08-Apr-2026 |
Andreas Gohr <andi@splitbrain.org> |
SearchIndex: review fixes — auto-save MemoryIndex, cast TupleOps counts, style cleanups
- MemoryIndex: auto-save dirty data on unlock/destruction to prevent silent index corruption when indexes ar
SearchIndex: review fixes — auto-save MemoryIndex, cast TupleOps counts, style cleanups
- MemoryIndex: auto-save dirty data on unlock/destruction to prevent silent index corruption when indexes are used in tandem - TupleOps::parseTuples(): cast exploded count strings to int - FileIndex::retrieveRow(): document the write-on-read padding behavior - Fix whitespace issues in ApiCore, common.php, Sitemap/Mapper - Update concept.txt to reflect MemoryIndex auto-save behavior
show more ...
|
| #
21fbd01b |
| 07-Apr-2026 |
Andreas Gohr <andi@splitbrain.org> |
SearchIndex: add integrity checking to Collection architecture
Add checkIntegrity() to AbstractCollection and DirectCollection that verifies paired indexes have matching line counts (token==frequenc
SearchIndex: add integrity checking to Collection architecture
Add checkIntegrity() to AbstractCollection and DirectCollection that verifies paired indexes have matching line counts (token==frequency, entity==reverse, entity==token for direct collections). Throws IndexIntegrityException on the first inconsistency found.
Add Countable interface to AbstractIndex with count() implementations in MemoryIndex and FileIndex. Add Indexer::checkIntegrity() and Indexer::isIndexEmpty() to orchestrate checks across all collections.
Update infoutils.php to use the new Indexer API instead of the old FulltextIndex/MetadataIndex classes.
Fix range(1, 0) bug in three places that produced [1, 0] instead of an empty array when split-by-length indexes were empty.
show more ...
|
| #
83b3accc |
| 06-Apr-2026 |
Andreas Gohr <andi@splitbrain.org> |
SearchIndex: rewrite Indexer to use Collection classes
Replace the intermediate #2943 classes (FulltextIndex, MetadataIndex) with the new Collection-based architecture. The Indexer is now a thin sta
SearchIndex: rewrite Indexer to use Collection classes
Replace the intermediate #2943 classes (FulltextIndex, MetadataIndex) with the new Collection-based architecture. The Indexer is now a thin stateless orchestrator that delegates all index work to collections.
Key changes: - Indexer no longer extends AbstractIndex; page name passed to methods - addPage/deletePage/clear use PageTitleCollection, PageFulltextCollection, and PageMetaCollection - New PageMetaCollection replaces separate ReferencesCollection and MediaCollection with a single class that handles arbitrary metadata keys dynamically - Shared writable FileIndex('page') passed to all collections - Logger callback replaces verbose parameter - Methods return void instead of bool - Index classes implement IteratorAggregate for clean data access - Indexer tests consolidated into namespaced IndexerTest.php - All callers updated to new stateless API
show more ...
|
| #
c66b5ec6 |
| 05-Apr-2026 |
Andreas Gohr <andi@splitbrain.org> |
SearchIndex: rewrite Lock as static registry with reference counting
Replace the instance-based Lock class with a static registry that tracks held locks per-process with reference counting. This sol
SearchIndex: rewrite Lock as static registry with reference counting
Replace the instance-based Lock class with a static registry that tracks held locks per-process with reference counting. This solves three problems:
- Split indexes (w3, w4, ...) share a single lock name and now coordinate naturally via the registry - Multiple callers can acquire the same lock without conflict - Indexes enforce their own writability through lock()/unlock() methods on AbstractIndex
The Lock registry manages both the filesystem lock (mkdir) and the in-process tracking. The first acquire creates the directory, subsequent acquires increment the refcount. Release decrements, and only removes the directory when the count reaches zero.
Note: I am not sure if implementing this as a static object is a great idea or if we should pass an instance through the collection to the indexes...
show more ...
|
| #
fb5311ec |
| 30-Oct-2025 |
Andreas Gohr <gohr@cosmocode.de> |
SearchIndex: RID cache should not be static
A static var interferes when the same class is instantiated multiple times
|
| #
596d5287 |
| 11-May-2023 |
Andreas Gohr <andi@splitbrain.org> |
Working fulltext collection and search
This finalizes the FulltextCollection and FulltextCollectionSearch classes. Proper locking is implemented, tests have been enhanced.
It should be possible to
Working fulltext collection and search
This finalizes the FulltextCollection and FulltextCollectionSearch classes. Proper locking is implemented, tests have been enhanced.
It should be possible to reimplement the page full text search on top of it.
show more ...
|
| #
7fcedc39 |
| 09-May-2023 |
Andreas Gohr <andi@splitbrain.org> |
Indexes can now be opened in readonly mode
|
| #
9f63f003 |
| 08-May-2023 |
Andreas Gohr <andi@splitbrain.org> |
add method to retrieve multiple rows at once
|
| #
03a35633 |
| 12-Sep-2022 |
Andreas Gohr <andi@splitbrain.org> |
added method to search an index by regular expression
|
| #
dec26820 |
| 08-Dec-2021 |
Andreas Gohr <andi@splitbrain.org> |
retrieveRow needs to pad the index, too
|
| #
8ed35011 |
| 08-Dec-2021 |
Andreas Gohr <andi@splitbrain.org> |
better method names
|
| #
d6396b6d |
| 08-Dec-2021 |
Andreas Gohr <andi@splitbrain.org> |
we need the same access methods in both index types
|
| #
9bd7d62f |
| 08-Dec-2021 |
Andreas Gohr <andi@splitbrain.org> |
Changed IndexAccessor names based on access method not content
|