Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

Valid from 5.5Available

for both the Enterprise edition and the Community edition of Datafari.This documentation is valid from Datafari 5.5 onwards.

The Regex Entity Connector is used to extract information from the content of a document thanks to a regular expression and populate a Solr metadata with the result.

Here is some applications:

...

For example, you can use it to extract e-mails, phone

...

numers, product numbers from documents. You could also extract words coming from a list, and later decide to display them as facets.

How to use it

Add the Regex Entity Connector in the job pipeline in the Connection tab of MCF.

...

It must be inserted after the TikaServerRmetaConnector. It needs the document to be transformed in text, otherwise the document contains only binary data.

Then in configuration screenthe Regex Entity configuration tab that appears, fill in as explained below :

...

Column Metadata: the metadata (present in the Datafari Solr) to be filled. Some valid metadata are given as example. We do not recommend using these examples, as chances are high that it may collide with another indexing pipeline that may overwrite its value. You could for instance create dedicated fields for your metadata dedicated to regex, for instance regex_phones.

Associated regular expression: the regular expression used to extract data and fill the metadata. An example is given to retrieve the line in the document containing the word “option“, case insensitive.

Note
  • The metadata must exists exist in Solr environment (no check done).

  • Because of the fact that Since several values can be found in a document, take care to choose a multi-valued metadata.

  • You can define only one regular expression per metadata for this version (as of June 1st, 2023).

  • The regex are only applied to what Tika considers as "content" in the source document, this excludes therefore any document metadata (as of June 1st, 2023).

You can add as many destination metadata as you want by clicking on the Add button.
If a metadata is already present and you add the same with another regular expression, this one will replace the currentprevious one.

Some examples of useful regular expression:

...