7 min read #OpenCloud#UX#Tech

OpenCloud · Search

Search in OpenCloud: tags, match context and less memory

A file you can't find again is as good as lost. Since 9.0.0, OpenCloud also searches tags and shows for every result why it matched. With 9.1.0, the built-in Bleve search index needs far less memory while indexing: a rebuild that crashed with 3 GB of RAM now completes. Further fixes close gaps where Bleve and OpenSearch returned different files for the same query.

Anyone who works with documents searches all the time. The quote from last spring, the meeting minutes where a project name came up, the contract a colleague filed somewhere. Folder structures only help as long as everyone sticks to the same scheme, and once shared folders and project spaces are involved, nobody does. What's left is search, and it decides whether someone finds the file in half a minute or writes it again from scratch.

Operators face a different question. OpenCloud ships Bleve, a search index that runs in the same process and needs no additional service. For large and highly available installations there is OpenSearch. A small organization shouldn't be pushed into running an OpenSearch cluster just to keep search from crashing, and anyone who switches later shouldn't suddenly get different results.

Tag search and match highlights

Since 9.0.0, the search bar also searches tags. If you type “apollo”, you find the file with “Apollo” in its name, the file with the word in its text, and the meeting notes that only carry the tag “Apollo”. Tags are matched as partial words and case-insensitively, so “alpha” also finds the tag “Project Alpha”. In “Title only” mode, content and tags are left out.

Search results for “apollo” in tile view: the space “Project Apollo”, the file “Apollo_Quote.pdf” with “Apollo” in bold in its name, “Meeting_Notes_2026-10.md” with the tag “Apollo”, and “Project_Plan.docx” with the text snippet “... 2: The Apollo rollout starts in the ...”. The tag and the text snippet are outlined in red.

Results for “apollo”: one via the name, one via the tag, one via the content. The line that gives the reason is marked in red (9.2.0 with Tika, test files).

Below each result you see why it appears: the matching tag, or a snippet of text with the search term highlighted. The snippet is one line long and is trimmed so the match itself stays visible. Before, the highlighted term could be cut off in tile view. The search term is now also highlighted in the file name.

OpenCloud 8.1.0: search result “Site_Inspection.txt” in tile view with the snippet “...orth building, second floor: the ne...”. The search term “elevator” is not visible.

8.1.0: searching for “elevator”, the snippet ends before the term appears.

OpenCloud 9.2.0: the same result with the snippet “...ervice elevator still needs its final ...”, with “elevator” highlighted in yellow.

9.2.0: the snippet is trimmed around the match.

The tag filter in the search results is always present as soon as the server supports tags. Previously it only appeared once at least one tag existed, so anyone who hadn't created a tag yet never learned the filter was there. Without tags, the filter now explains where to add them. The same filter is available in Favorites.

OpenCloud 8.1.0 without tags: above the search results there are only the filters “Type”, “Last Modified” and “Title only”.

8.1.0 without tags: no tag filter. “Title only” appears even though no Tika is running here.

OpenCloud 9.2.0 without tags: filters “Type”, “Tags” and “Last Modified”. The tag filter is expanded with the hint “No tags yet. Add tags to files and folders in the details panel to filter by them.”

9.2.0 without tags: the “Tags” filter is there and explains where to add tags. Without Tika, “Title only” is now gone.

  1. “Favorites” view with four entries: folder “Reports”, “Invoice_2026-11.txt”, “Roadmap.txt” and “Status_Report.md”. The “Tags” filter is marked in red.
    The “Tags” filter also sits above Favorites.
  2. Expanded tag filter with the search field “Filter tags” and the tags “Apollo”, “Finance” and “Project Alpha”.
    It lists the existing tags.
  3. Favorites filtered by “Project Alpha”: “Roadmap.txt” and “Status_Report.md” remain.
    With “Project Alpha”, only favorites with that tag remain (9.2.0).

From 9.0.0 on, OpenCloud searches tags without any extra configuration. Searching file content, on the other hand, requires Apache Tika as a separate service: SEARCH_EXTRACTOR_TYPE=tika, the address in SEARCH_EXTRACTOR_TIKA_TIKA_URL, and FRONTEND_FULL_TEXT_SEARCH_ENABLED=true so the web UI knows about it. Before 9.0.0, the server always reported content search to the web UI as available, even when no Tika was running at all.

The pull request itself names two limitations. Because tags match as partial words, a short term like “test” also finds the tag “testing”. And search doesn't weight name, content and tag differently; the order comes from the search index alone.

Also since 9.0.0, two things nobody searches for no longer show up as results: the root of your personal space, which carries the owner's name, and the .space folder holding a project space's image and description. Both stay in the index but are filtered out. To do this, every search runs through a KQL template that admins can adjust with SEARCH_QUERY_TEMPLATE or turn off with an empty value. It applies to existing indexes without a rebuild.

Bleve on limited memory

The case that led to 9.1.0 came from an installation with about 5 TB of data. After a corrupted Bleve index had been deleted and was being rebuilt, the search service's memory use grew past the container's limit, at 20 GiB and at 30 GiB alike. Because all services run in one process in the all-in-one package, the crash took storage, proxy, postprocessing and NATS down with it.

The analysis in the pull request found two causes. Bleve processes an entire batch of documents in memory before writing it, and with full-text content it needs more than ten times the amount of text to do so. But a batch was limited only by the number of documents, 50 according to SEARCH_BATCH_SIZE, regardless of whether they were short notes or books. On top of that, a rebuild with --concurrency wrote several batches at the same time.

Since 9.1.0, Bleve writes a batch at 16 MiB of document data at the latest, and only one at a time. In the pull request's test, a forced rebuild of about 34,000 book-length text files with 3 GB of RAM had aborted after five minutes. The measurement was a full rebuild of eleven spaces with a 22 GB index and --concurrency 3:

3 GB RAMbefore9.1.0
Full rebuildaborted after 5 minutescompleted (2 of 2 runs)
Memory for analysis, peak1.86 GB0.37 to 0.38 GB
Memory outside merges, peak2.94 GB0.98 to 1.10 GB

With 12 GB of RAM, indexing took about 5 percent longer, which is within the run-to-run variation of up to 12 percent.

One limitation remains, and the documentation now states it. In the background, Bleve merges small index segments into larger ones, and for that it briefly needs considerably more memory than for searching or indexing. As a rule of thumb, the documentation recommends keeping about a tenth of the index size free in addition, measured by the Bleve directory in the data path. This mainly affects installations with content search and many long texts. Clustering and replication are what OpenSearch is for.

Same results in Bleve and OpenSearch

Since 8.0.0, a test suite of more than 300 cases has made sure Bleve and OpenSearch return the same results: it runs each of its KQL queries against both engines and compares the results. Versions 9.0 to 9.2 added more fixes so that moving from Bleve to OpenSearch doesn't bring different results.

A photo with broken GPS data in its EXIF metadata, such as a latitude above 90, was rejected outright by OpenSearch, so the file couldn't even be found by its name. Bleve accepted it and placed it at the pole. Since 9.1.0, the file lands in the index of both engines without a geo coordinate, and a dedicated test case checks this. When OpenSearch rejects a document, this now also shows up in the log instead of the document silently going missing. That doesn't yet prevent the loss, and there is no retry.

Also since 9.1.0, path search strips a trailing slash in one place for both engines, and path:"/" stands for the root of the space instead of finding nothing. Search terms containing quotes, like Angebot "Entwurf", used to break the query. Since 9.1.0, the web UI doubles the quote character as KQL requires, and the server understands it. If a search fails, the web UI shows an error message instead of “No results found”, and pressing Enter again repeats the search.

Sources