Why regular expressions are not supported on index searches

People generally love the speed of index searches, but there are a few power users who wish they could also run regular expression (regex) searches against the index. The power of regex with the speed of the index, what’s not to like? From the support desk this week:

“I’d like to use a regular expression in an index-based search to find lines that simultaneously contain the keywords 230 and 2015, with the requirement that 230 must be surrounded by whitespace characters on both sides, and 2015 must be preceded by a whitespace character.”

The trouble is that indexes aren’t designed to handle regular expression searches. To understand why, let’s think about how an index works.

How does an index work?

Just like the index at the back of a book, the index for search data is basically a sorted list of terms taken from the source data. Anything that doesn’t look like a term, eg, a lone % sign, is stripped from the text. There are some additional data, such as term frequency, and term positions, but the terms aren’t stored in sentence order.

For example, the line of text:

file_locator work-efficiency calculation:(normal-speed*50%)=lots

Results in the following term database:

50
calculation
efficiency
file_locator
lots
normal
speed
work

An index search can quickly scan the term database for the individual search terms and link them back to the original document.

However, a regex, which is typically implemented as a directed graph of nodes and arcs representing transitions based on the input stream, requires the whole stream of text to work. It won’t work on a database of terms. Now, you could run a regex over the individual terms in the database (which we may implement in the future), but a regex spanning multiple terms is not possible.

Looking back at the original question, the end-user’s request doesn’t necessarily need to be a regex to work. You can use angle brackets to define the word boundaries and the NEAR operator for proximity. So, this search term would probably suffice:

<230> NEAR <2015>

Note: Notice how certain characters are stripped from the text, such as *, %, and -. That has the unfortunate side effect of preventing searches for those characters. The program will, however,  compensate, so a search for ‘work-efficiency’ still works, but it will also match ‘work efficiency’ or even ‘work#efficiency’.

I REALLY want to use a regex

Not all is lost. Most of the effort spent searching through PDFs and Word docs is spent converting the file formats into text. The actual string search is very fast. That conversion effort can be avoided with the Caching functionality, which stores extracted text in a local database for super quick retrieval in future searches.

So, if you need to run regex searches on a group of documents consider switching on Caching for lightning-fast searches, it’s not as quick as Index search but it’s pretty damn fast.

New help videos

We’ve recently added two new YouTube videos describing features customers are often unaware of:

Column Filters

Column filters provide a quick way to filter the results of a search. Quite often, when people ask difficult ‘How do I search for’ questions, the answer is to use Column Filters to refine the search. More information can be found here:

https://help.mythicsoft.com/filelocatorpro/v9/en/filelistview.htm

Index Searching Tips

Since the index interface doesn’t have separate fields for separate search features it can be harder to figure out how to describe your search. This video aims to show common index search techniques. More information can be found here:

https://help.mythicsoft.com/filelocatorpro/v9/en/index-interface.htm

What’s next?

We have a few more ideas for videos but if you would like to see a video on a specific feature please send the request to Technical Support.

Crash Reports

Crash reports are incredibly useful, they allow us a detailed look at the state of the software at the time of the issue. Some of the most gnarly and difficult bugs have been resolved through the use of crash reports.

Crash investigation tool

But of all the crash reports we receive we only look at about 1-2%. Why?

We receive just under 2,000 crash reports a month. Guess how many of those are from legitimate installations of our software? Yep, around 1-2%. Those illegitimate crash reports are filtered out and never looked at because the software is designed to crash if the software detects program manipulation.

Fortunately, for legitimate users of our software crashes are very rare but if you do ever experience one please send it, every genuine report is investigated.

Agent Ransack featured in Disney+ series

They say that imitation is the the sincerest form of flattery so imagine my surprise watching Dopesick (S1, E5) on Disney+ when the hard working DEA agent is introduced to a tool that looks like Agent Ransack:

“… what’s taken you months will now be accomplished in just a few seconds.”

I say ‘looks like’ because they’ve moved a few things around. Here’s the Dopesick screen shot (approx. 12:09s):

And here’s a screenshot of Agent Ransack circa 2003 (1.7.3):

They’ve removed the ‘File name’ fields and moved the date and size fields but the rest is identical.

Disney probably should’ve asked Mythicsoft for permission to use an altered version of Agent Ransack in their show but I’m satisfied with the compliment.

Version 2022 – Release

We’re really pleased to announce that the next version of FileLocator Pro and Agent Ransack is now available for download:

https://www.mythicsoft.com/filelocatorpro/download/

There’s lots of nice new features including:

  • New visual themes (including a Dark theme)
  • Improved indexing functionality, including a new automatic update scheduler, index groups, and indexing of archives (e.g. zip, tar etc).
  • Optical Character Recognition (OCR) functionality
  • Many more small updates and fixes

Continue reading

Version 2021 Beta release available

I’m pleased to announce that the beta version for the next major release of FileLocator Pro and Agent Ransack is now available to download. This version has been a long time in the making and includes some really nice improvements, and will be a free upgrade for any recent purchases.

Highlights:

  • OCR text for scanned documents and images
  • Major improvements to indexing and index management
  • User interface updates, including a dark theme
  • Many more minor improvements

Please note that this is a beta version of the product and will contain bugs, although hopefully not too many. The help file has not yet been updated so if you have questions about specific features please ask Support.

Over the next few weeks more beta versions will be released along with improved documentation on the new features so please check back here for updates.

Download:

Full installation: 32-bit & 64-bit

Portable version: 32-bit | 64-bit

Continue reading

New Blue theme

We’ve been ‘dog-fooding‘ the next major version for a few weeks now and everything is looking really nice, there’s still a few issues but work is progressing well. One of the areas that has had a big revamp is the visual themes, here’s an example of the new ‘Blue’ theme:

If you look closely you’ll also see a language change from ‘DOS Expression’ to ‘Wildcards’. The term ‘DOS Expression’ has been used in the product for over twenty years but now, when some of our younger users have never heard of DOS, the decision was made to gracefully retire the term from the UI.

Running a little late, sorry

Just in case you’re wondering what’s going on with FileLocator Pro and Agent Ransack we just wanted to share some updates.

There’s no denying that version 9 is running late. We had hoped to release it in 2019 but the Agent Ransack Pro/Lite mode work pushed it back quite a bit. There’s also been a lot of feedback from version 8, especially surrounding indexing, which has involved a major rework of how indexing works internally.

Indexing in v9 will include an option for real-time updates, the ability to group indexes together, and also precise search options, including search by Name, Size, Date, Type, and Location. A sneaky preview screenshot also shows that the indexing history is much more accessible to help diagnose and resolve any indexing issues.

One other thing you’ll probably notice from the screenshot is that there is now an improved dark theme for v9, a very common feature request.

Don’t worry if indexing isn’t an important feature for you as there’s plenty of other new functionality coming in v9, which we’ll be sharing over the next few months.

At the moment the expected release date is Apr 2021 but whatever the actual date is all v8 purchases made now are guaranteed to work for v9.