Stemmed Lucene Implementation Details
Search with the Lucene query syntax, using stemmed terms. A search for 'trees' will get a hit on 'tree' This requires an extra indexed field when it is enabled in the load.
Algorithm:
The Stemmed Lucene search has the following characteristics:
- This search is case in-sensitive.
- It searches on the stem 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: Automobiles
Lucene query: stem_propertyValue:automobil
Complete query:
- +*:* +(entityType:concept)
- +*:* +isAnonymous:F
- +*:* +stem_propertyValue:automobil +isPreferred:T +(propertyType:presentation)
Result: 1 result
- entity code: A0001
- entity description: Automobile
Example 2:
Search string: Automobiled
Lucene query: stem_propertyValue:automobil
Complete query:
- +*:* +(entityType:concept)
- +*:* +isAnonymous:F
- +*:* +stem_propertyValue:automobil +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/TestStemming.java