Skip to content

Conversation

@jomart1985
Copy link

i hope if you support support for ngram indexer

hasselmm and others added 30 commits July 26, 2012 17:55
Fix compilation under FreeBSD
- Should close all but the first SkipBuffer.
Alain Barbet <alian@amisw.com>
Also added a note regarding the current incompatibility with
Boost 1.50 and newer (issue #30).

See: #30
Improved the README file's build instructions
Commit e3f8992 ported the code to use Boost.Filesystem V3 API,
so the warning about not being able to use Boost 1.50+ is no longer true.
Remove outdated note about Boost incompatibility from the README.
I've observed crashes where one thread is in the middle of initializing
ZZ_CMAP and other is trying to use the partially initialized array and
crashes.
Use boost::once to ensure that only one thread handles the initialization
and no thread uses the data until it is fully initialized.
Fix races when initializing static arrays in StandardTokenizerImpl
The argument should be named startOffset, not endOffset, otherwise the
function is a no-op.
berolinux and others added 30 commits March 27, 2024 13:38
boost::filesystem::wpath has been deprecated (and typedef-ed to
boost::filesystem::path) for a long time; it is removed from boost
starting with 1.85.0-beta1.

Use boost::filesystem::path instead.

boost/filesystem/convenience.hpp has been removed (and was being
included without being used anyway - its only use was indirectly
pulling in boost/filesystem/directory.hpp, which is actually used).

Include boost/filesystem/directory.hpp directly instead.
The code previously used the deprecated (and with bost 1.87.0 removed)
`boost::asio::io_service`, which used to be an alias to `io_context`.
The new version heavily changes the `io_context` API and therefore is no
the old interface was removed.

Fixes #208

Signed-off-by: Christian Heusel <christian@heusel.eu>
…o_context

Migrate to boost::asio::io_context
Fix typos in Set<T>::swap() and Collection<T>::swap().

Apparently, no compiler ever tried to compile these methods before.
This commit addresses critical crashes that occur when trying to read certain
Lucene index files where field data may be corrupted or have incompatible format.

Root causes:
1. Assertion failures in FieldsReader::doc() when bits flag or compressed field
   format is incompatible with expected values
2. Null pointer dereference in boost::shared_ptr when trying to add fields to a
   document with potentially corrupted data

The fixes include:
- Replace assertions with safe handling for invalid bit flags and format incompatibilities
- Add null checks before dereferencing shared pointers in critical paths
- Create field objects separately before adding them to documents
- Add proper error handling for decompression failures
- Ensure uncompress and string conversion methods never return null values

These minimal changes maintain the original logic but make the code more robust
when dealing with unexpected or corrupt index data. Instead of crashing, the code
now gracefully handles these edge cases and continues processing where possible.
Fix crash when reading corrupted or incompatible Lucene index files
- If `boost::filesystem::directory_entry::status` fails, return false instead of throwing a `boost::filesystem::filesystem_error` exception.
- During file enumeration, if an `ENOENT` error occurs, re-enumerate all directory entries to increase robustness.
Boost.System has been header only since Boost 1.69.0
Handle file enumeration exceptions in FileUtils::listDirectory
Fix typo in MAX_VARINT32_LENGTH constant in BufferedIndexInput.cpp
Fix old comment about C++ standard
BitSet: Partial fix for Boost 1.90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.