GroupDocs.Search for Java 26.6 Release Notes
Full list of changes in this release
| Key | Category | Summary |
|---|---|---|
| SEARCHNET-3524 | ★ Feature | Add default text extraction for .log and .md files |
| SEARCHJAVA-DOC-NOT-FOUND | 🔧 Fix | Skip missing documents during search instead of throwing |
| SEARCHNET-3567 | Enhancement | Throw a clear exception when the maximum array size is exceeded |
Major Features
This release brings one new functional feature plus two robustness improvements for indexing and search:
- Add default text extraction for .log and .md files
- Skip missing documents during search instead of throwing
- Throw a clear exception when the maximum array size is exceeded
Add default text extraction for .log and .md files
🌐 GroupDocs.Search now treats .log files as plain text out of the box. The built-in plain-text extractor recognises .md, .log and .txt, and a new FileType.LOG value is exposed so .log documents are reported with a dedicated file type in search results. No configuration is required — .log files placed in an indexed folder are picked up automatically.
Index index = new Index(indexFolder);
// .log (and .md / .txt) files in the folder are now indexed as plain text
index.add(documentsFolder);
SearchResult result = index.search("error");
System.out.println("Found in " + result.getDocumentCount() + " document(s)");
// .log files are reported with the new dedicated FileType.LOG
for (int i = 0; i < result.getDocumentCount(); i++) {
DocumentInfo info = result.getFoundDocument(i).getDocumentInfo();
if (info.getFileType() == FileType.LOG) {
System.out.println("Log file matched: " + info.getFilePath());
}
}
Skip missing documents during search instead of throwing
🌐 Previously, composing search results over an index whose document set had changed (for example after a document was deleted or the index was optimized) could fail with a "Document is not found" exception. From this release the lookup returns null for a missing document and the result composition simply skips it, so search returns the remaining matches instead of aborting. The change covers all result kinds — light, heavy, phrase and composite results — as well as image search.
Index index = new Index(indexFolder);
// Documents may have been removed or the index optimized after the last update
index.optimize();
// Search no longer throws "Document is not found"; missing documents are skipped
SearchResult result = index.search("payment");
System.out.println("Documents: " + result.getDocumentCount());
System.out.println("Occurrences: " + result.getOccurrenceCount());
Throw a clear exception when the maximum array size is exceeded
🌐 When indexing very large data sets, the internal character tree could silently overflow the 32-bit (Int32) limit on the size of its backing byte array, producing an obscure failure. The allocation path now validates the required size using 64-bit arithmetic and throws an explicit exception with diagnostic statistics (array length, term count, total and separate character counts) the moment the Int32 limit would be exceeded, making the root cause obvious.
Index index = new Index(indexFolder);
try {
index.add(veryLargeDocumentsFolder);
} catch (Exception e) {
// On extremely large corpora the character tree now fails fast with a clear
// message and statistics instead of an opaque overflow error, e.g.:
// "Cannot allocate array larger than Int32.MaxValue.
// arrayLength = ... termCount = ... totalCharCount = ... separateCharCount = ..."
System.out.println("Indexing limit reached: " + e.getMessage());
}