Indexing a share for search

Search finds nothing in a share until that share has been indexed, and how much it finds depends entirely on which profile you give it. This article covers the per-share half of the job. Getting the search service itself running is separate, and if you haven’t done that yet, start with Setting up Foldr Search.

Written against Foldr 11.1.

Choosing the share’s search profile

In Foldr Settings, go to Shares, open the share, and choose Search from its menu. The Search profile is the first thing on the page.

The Search page of a share, with the Search profile set to Content with OCR

There are five profiles plus a custom option, and each one includes everything the one above it does:

  • Off. The share won’t appear in search at all.
  • Names and metadata. File names, paths, modified dates and custom field values are searchable. File contents aren’t indexed.
  • Content. Adds full-text search for PDFs, Word, Excel, PowerPoint, plain text and similar formats. Scanned PDFs and images aren’t included, because there’s no text in them to read.
  • Content with OCR. Adds OCR, so scanned PDFs and images become searchable too, and results can highlight the matching region on the page.
  • Content with AI field extraction. Adds AI extraction of custom field values out of documents such as invoices, forms and contracts.
  • Custom (advanced). You set the individual settings yourself, which we’ll come to below.

Which of these you can choose depends on your licence, so your list may be shorter than the one above.

Content with OCR is the one to watch. If it isn’t offered, you can still index scanned documents: choose Custom (advanced) and turn Enable OCR on from the Content extraction page described below, picking the built-in engine on the server or your own AWS Textract or Google Cloud Vision account. It’s Foldr’s own Cloud OCR service, rather than OCR in general, that depends on your licence.

Which one should you pick?

For most shares, Content is the right answer and it’s cheap. Reach for Content with OCR when the share actually holds scanned material: incoming post, signed forms, anything that arrived on paper or as a photo. It’s also the profile you need if the share will ever be searched for a subject access request, since scanned documents are a large part of what those turn up (see Setting up Disclose).

Being honest about the trade: OCR is slow and works the server hard, because every page of every image has to be read. Putting it on a share that holds nothing but Office documents buys you nothing and costs you crawl time, so it’s worth thinking share by share rather than switching it on everywhere.

Pointing the share at the search server

If search runs on its own server, which is the usual arrangement, each share also has to be told where its index lives. Turn on Show advanced settings on the same Search page and fill in two boxes:

  • Host, the address of the server running the search service.
  • Core name, the core you created there for the index.

Get either of these wrong and the share looks perfectly configured while nothing is ever indexed into it, so it’s worth checking against Setting up Foldr Search rather than from memory. Where one server does both jobs, the host is the machine itself, but the core name still has to match a core that exists.

What the profile actually sets

A profile is a shortcut. Everything it configures is on the Content extraction page, a few items further down the same menu, and that’s where you look when a share is on Custom (advanced) or when you want to change one thing without disturbing the rest.

The Content extraction page, showing text extract, visual extract and the OCR settings

The settings worth knowing:

  • Index file contents. The master switch for reading inside files at all.
  • Content handling. How much of what’s read is kept, covered just below.
  • Extraction mode. Text with OCR fallback (read the text, fall back to OCR when there isn’t any), OCR only, or Text only.
  • Text extract. The file types Foldr pulls text out of.
  • Visual extract. The file types Foldr also records positions for. More on this below too.
  • Process barcodes. Reads barcodes found in documents.
  • Enable OCR and OCR engine. Whether scans are read, and by what: the built-in engine, or a cloud service such as AWS Textract.

The three content handling modes

Worth understanding before you pick one, because the difference only shows up later, in what search results look like:

  • Process, index and store. Content is extracted, custom field values are worked out, and the full text is kept in the index. This is what makes result snippets and on-page highlighting possible.
  • Process and index. The same, but the full text isn’t kept, so there are no snippets and no highlighting.
  • Process only. Content is extracted and used for field extraction as the file is indexed, then discarded.

OCR languages

OCR reads English out of the box. If your documents are in something else, the languages you can add are Bulgarian, Danish, Dutch/Flemish, Farsi, Finnish, French, German, Norwegian, Portuguese, Spanish, Swedish, and Chinese in both simplified and traditional. Adding languages makes OCR slower, so add the ones you actually have rather than all of them. If you need one that isn’t on the list, get in touch and ask.

What does visual extract actually do?

Text extract gets the words. Visual extract also records where on the page each word sits.

There are two ways it gets those positions, and this is the part that’s easy to misread. Where a document already carries its own text, an ordinary PDF or an Office file, the positions are read out of the document’s own structure and no OCR happens at all. Where there’s nothing to read, a scan or a photograph, the positions come from OCR instead. Both routes are visual extract, so it isn’t another name for OCR: OCR is one of the two ways in.

The practical upshot is that you can have highlighting on your PDFs and Office documents with OCR switched off entirely, which is a good deal quicker than the alternative if you have no scanned material to worry about.

That position data is what lets a search result highlight the matching region rather than just naming the file, and it’s what the field extraction in Captur and the redaction step in Disclose both build on. If you’ve ever wondered why a search hit opened a PDF and pointed straight at the paragraph, this is why.

Worth knowing when you pick a profile: plain Content doesn’t set visual extract at all, so it gives you full-text search without the highlighting, even on ordinary PDFs where no OCR would be needed. Content with OCR and Content with AI field extraction both fill the list in with PDF, JPG, JPEG, PNG, TIFF, TIF and GIF, and it accepts Office types too. If you want positions on digital documents without turning OCR on at all, that’s a job for Custom (advanced): set the Visual extract list yourself and leave Enable OCR off.

On a Custom (advanced) share it’s also worth checking the box isn’t empty, because a share can have OCR switched on and still produce no positions, which looks like everything is working right up until the moment something needs to point at a page.

Running the first crawl

Nothing is indexed until a crawl runs. Choose Activity from the share’s menu and press Crawl now.

The Activity page of a share, showing the Crawl now button and the crawl jobs list

You get two choices:

  • Scope. The entire share, or a folder you pick. Crawling one folder is useful when you’ve just changed a setting and want to see the effect without waiting for everything.
  • Mode. A standard crawl (new and changed files), re-index everything, or re-index only the files that are missing content or previously failed.

The first crawl of a large share takes a while, and there’s no way around that: every file has to be opened and read once. Later crawls only pick up what changed, so they’re much quicker. The same page lists crawl jobs and recent activity, so you can see how it’s getting on rather than guessing.

Shares that don’t need indexing at all

Cloud locations such as OneDrive, SharePoint, Google Drive and Dropbox can be searched through the provider’s own search instead of through the Foldr index. On those shares the Search page offers a Search backend choice: use Foldr search, or use the share’s native search.

Pick native search and there’s no profile to set and no crawl to run, just a switch for whether the share appears as a search location. It’s the lighter option, though you give up the parts that depend on Foldr having read the files itself, OCR and visual extract among them. For the middle ground, where Foldr indexes cloud storage but tracks changes efficiently, see Indexing cloud storage with delta queries.

Checking it actually worked

A crawl that finishes is not the same as a crawl that read everything, and this is the step people skip.

Some PDFs are pictures of text and yield nothing without OCR. Some files are corrupt, password-protected, or simply too large. The share’s Audit page shows what’s in the index, including the files whose content couldn’t be read, grouped into files with no readable text and files that hit an indexing error.

That list is worth a look before you rely on the index for anything that matters, and it’s directly actionable: the re-index missing or failed content crawl mode targets exactly those files, so if you switch OCR on after a first pass, you don’t have to re-crawl the whole share to pick up the scans you missed the first time.

← All articles