Recommendations for approximate text search in Data service?

Hi, looking for your recommendations on the best way to do approximate text search in the Data service.

For simplicity, suppose a Data table with one string member that can be multi-word strings. We assume users are can mispell words and may not specify in a query in the same order they occur in the target string in the data table column.

One might use something like Lucene to do this kind of approxmate matching. Presumably one would have run a Lucene server that first matches a query string to a string (or strings) that occurs in the Data service table and using that result to actually query Backendless. It doesn’t appear one could run a Lucene instance on Backendless itself.

The Backendless Data service docs say that Backendless essentially implements the SQL-92 WHERE clause where the “LIKE” predicate is probably the only relevant approximate string matching predicate. Assuming “LIKE” is available, one might propose two general solutions as a half-way step in which one isn’t concerned with word order, only a general class of per-word misspellings:

  1. One could reduce a query string to a pattern string and try to match to that.

  2. One could create a column of stemmed strings in Backendless and reduce the user’s query string to a stemmed string, and then perhaps to a pattern string, and match to that.

Any suggestions for a better, more flexible solution?

Hi Rick,

Great question! Yes, the LIKE operator is available and both options you described would work. Alternatively, you could also create an event handler for the tables with searchable content. The event handler would be attached to the “create”, “update” and “remove” events. The custom code in the handler would need to replicate the searchable data (with any relative metadata) into Amazon’s CloudSearch. Once the data is available in CloudSearch, you could use Amazon’s API to perform traditional full text search queries.

We’re contemplating providing direct APIs for this purpose as well which would eliminate the need for most of the steps I described.

Regards,
Mark

Hello Mark,

This would be an interesting feature. Is it available yet on 4.0 or 5.0 versions of backendless?

Hi Tobechukwu,

We have not implemented the full text search yet. More than likely, we’ll introduce a service via the Marketplace which provides integration with an external resource (like CloudSearch).

Regards,
Mark

Hey Mark, Did we ever get to this and launch anything on the marketplace?

No, there were always other tasks with higher priorities.