Skip to content

Releases: Paradoxianer/haiku

index_server Beta/Debug Build 1

Pre-release

Choose a tag to compare

@Paradoxianer Paradoxianer released this 06 Aug 22:28

First public beta of the revived Haiku index_server (Spotlight-like live content indexing and full-text search), built from the packaging branch of this fork.

This is a debug build: full debug symbols, and it now always logs to ~/config/var/log/index_server/index_server.log (previous run kept as .log.old) so any problem can actually be diagnosed. If something goes wrong, please attach that log (and the crash report from your Desktop, if debug_server produced one) to a bug report.

In the package

  • index_server itself, plus all six analyser add-ons (see below)
  • Settings preflet - exclude paths, per-analyser enable/disable, live indexing status
  • Search app - standalone full-text search window
  • Deskbar menu entries for both apps

Installing

  1. pkgman install index_server_debug-1.0.0~debug1-1-x86_64.hpkg
  2. Just start the index_server from /boot/system/servers or Run the attached start_index_server.sh once (sh start_index_server.sh). Installing alone does not start it immediately - the service triggers on initial_volumes_mounted, which already happened at this boot - so without this step it would otherwise just sit there until your next reboot. After running it once, it's enabled and will start automatically on every future boot too.

What it does

index_server watches your volumes and keeps files analyzed as they're created or changed, via a set of add-ons that each handle a different kind of content:

  • FullTextAnalyser - the core of it. Translates file content to plain text (via BTranslatorRoster, or reads it directly if it's already text) and feeds it into a CLucene full-text index. This is what the standalone search app queries - full-text results don't show up in Tracker's own Query mechanism, since this index lives outside BFS.
  • ThumbnailAnalyser - generates a thumbnail for image files (including Haiku's own HVIF icon format) and writes it to the same Media:Thumbnail/Media:Thumbnail:CreationTime attributes Tracker's own thumbnail code already reads - so thumbnails show up directly in Tracker's icon view, no separate viewer needed.
  • ExifAnalyser - reads EXIF metadata out of JPEG/TIFF images via libexif: EXIF:Make, EXIF:Model, EXIF:DateTimeOriginal, EXIF:Width, EXIF:Height.
  • AudioTagAnalyser - reads audio tags via TagLib: Audio:Artist, Audio:Album, Media:Title.
  • MediaKitAnalyser - reads codec/format info via the Media Kit (BMediaFile/BMediaTrack), for audio and video: Media:Codec, Media:Length, and for video also Media:Width/Media:Height.
  • MailAnalyser - extracts the body of mail files (text/x-email) and feeds it into the same full-text index as FullTextAnalyser, so mail content is searchable too.

All of these except FullTextAnalyser/MailAnalyser write plain BFS attributes, so that metadata is also visible in Tracker's own attribute columns and usable in ordinary BFS queries - only the full-text content itself needs the separate CLucene index and search app.

What's fixed in this build

A first backlog scan of a whole volume can take a while (tens of thousands of files); a system notification and the Settings preflet both show live progress.

Highlights fixed/added since the previous internal testing round:

  • Several real crashes fixed, including a shutdown-time race in the volume watcher, a double-free while indexing mail content, and a crash triggered by full-text-indexing plain source/text files (which also turned out to be needlessly loading every image codec on the system for every text file - fixed too).
  • Non-ASCII filenames and paths now index and search correctly (umlauts, accents, non-Latin names) - previously silently skipped.
  • HVIF icon thumbnails fixed - both a MIME-type case-sensitivity bug that skipped every real icon, and a canvas-sizing bug that made Tracker's 128px icon view specifically fail to show them even once generated.
  • Catch-up (the initial/backlog scan) is much more robust now: it no longer silently misses files that arrived without a MIME type already set (e.g. anything checked out via git), no longer fragments into multiple separate runs at startup, and - importantly - now saves its progress incrementally, so a crash or restart mid-scan only redoes the last small batch instead of starting the entire backlog over from zero.
  • A stale CLucene write-lock (left behind by an earlier unclean shutdown) no longer permanently blocks all future indexing.
  • Real vector icons for the server, the search app, and the settings preflet.

Known limitations

  • Filenames themselves aren't yet part of full-text search (only file content) - on the roadmap.
  • No rescan button in the Settings preflet yet (also on the roadmap) - if the index looks stale, ask for how to trigger one manually.