SearchIndex: rector, phpcs, type hint fixes
SearchIndex: add integrity checking to Collection architectureAdd checkIntegrity() to AbstractCollection and DirectCollection thatverifies paired indexes have matching line counts (token==frequenc
SearchIndex: add integrity checking to Collection architectureAdd checkIntegrity() to AbstractCollection and DirectCollection thatverifies paired indexes have matching line counts (token==frequency,entity==reverse, entity==token for direct collections). ThrowsIndexIntegrityException on the first inconsistency found.Add Countable interface to AbstractIndex with count() implementationsin MemoryIndex and FileIndex. Add Indexer::checkIntegrity() andIndexer::isIndexEmpty() to orchestrate checks across all collections.Update infoutils.php to use the new Indexer API instead of the oldFulltextIndex/MetadataIndex classes.Fix range(1, 0) bug in three places that produced [1, 0] instead ofan empty array when split-by-length indexes were empty.
show more ...
fix type hint for exception (implicit null issue)
Indexes can now be opened in readonly mode
replace user errors with exceptionsExceptions are better to handle than errors. What I don't like is thatwe now have an unfortunate mix of return code and exception signallingfor errors. Some met
replace user errors with exceptionsExceptions are better to handle than errors. What I don't like is thatwe now have an unfortunate mix of return code and exception signallingfor errors. Some methods still return false for errors while othersnow throw exceptions (always returning true otherwise).