NIH | National Cancer Institute | NCI Wiki  

Error rendering macro 'rw-search'

null

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Contents of this Page

Regular Expression Implementation Details

The regular expression search searches against lower cased text. Additionally, this searches against the entire string as a single token, rather than the tokenized string.

Algorithm:

The Regular Expression search has the following characteristics:

  • This search is searches only lower cased text. 
  • It searches on the untokenized lower cased property value.  
  • Parsing is done with Lucene's StandardAnalyzer.

Example of use:

The following examples are based on the Automobiles coding scheme.

Example 1:

Search string: automobi.*

Lucene query: untokenizedLCPropertyValue:automobi.*

Complete query:

  • +*:* +(entityType:concept)
  • +*:* +isAnonymous:F
  • +*:* +untokenizedLCPropertyValue:automobi.* +isPreferred:T +(propertyType:presentation)

Result: 1 result

  • entity code: A0001
  • entity description: Automobile


Example 2:
Search string: .*utomobile

Lucene query: untokenizedLCPropertyValue:.*utomobile

Complete query:

  • +*:* +(entityType:concept)
  • +*:* +isAnonymous:F
  • +*:* +untokenizedLCPropertyValue:.*utomobile +isPreferred:T +(propertyType:presentation)

Result: 1 result

  • entity code: A0001
  • entity description: Automobile

Associated JUnits:

Junits can be found here: https://github.com/lexevs/lexevs/blob/master/lbTest/src/test/java/org/LexGrid/LexBIG/Impl/function/query/lucene/searchAlgorithms/TestRegExp.java

 

 

  • No labels