Search Improvements

By Edouard on July 6, 2012

This week I released a few improvements to segment searching to WebTranslateIt.

Under the hood, I completely rewrote the search engine feature. Search was previously powered by Sphinx. While this is an extremely fast search engine, it had several important drawbacks which prevented me to implement often requested features, so I decided to rewrite search to use SQL queries directly against the database.

New feature: search for a key name or a translation

The new search system can now let you search specifically for a segment’s key or for a source or target translation.

It is really easy to use: type a query, then select whether you’d like to search for a key, or a text from the source translation or target translation. Of course, you can always search by all criteria like before, which is good to quickly find something.

Power users: regular expression search

You can now also search for a segment or a translation using a regular expression.

You can also combine this new feature with specific segment key or translation searching.

(Click to view larger)

What’s great is that all these advanced search results can also be combined with the usual filters, categories, statistics and batch operations, so this is really powerful.

On the following example, I search for all completed segments located in the file config/locales/default/en.yml whose key matches the regular expression ^activerecord(.*)blank$.

(Click to view larger.

You can see this specific query live here)

Other improvements

The new search feature should be more reliable. The previous system kept an index of your segments and required to be fully re-indexed from time to time. The drawback was that it wasn’t possible to search for segments while it was reindexing, which means you couldn’t actually use search for several minutes.

This is no longer the case. You segments should now always be searchable.

On top of that the search results should also work much better with foreign characters.


I hope you will like this batch of improvements to the search facility and that it will make your localization work easier. Thank you for using WebTranslateIt.