Skip to content
Snippets Groups Projects
Commit 236f1a5c authored by Rustam Lotsmanenko (EPAM)'s avatar Rustam Lotsmanenko (EPAM) Committed by Stanisław Bieniecki
Browse files

hotfix

parent b1588096
No related branches found
No related tags found
1 merge request!649Bag of words indexing
Pipeline #233375 failed
......@@ -48,6 +48,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static org.opengroup.osdu.core.common.model.search.RecordMetaAttribute.BAG_OF_WORDS;
import static org.opengroup.osdu.indexer.config.IndexerConfigurationProperties.KEYWORD_LOWER_FEATURE_NAME;
import static org.opengroup.osdu.indexer.config.IndexerConfigurationProperties.BAG_OF_WORDS_FEATURE_NAME;
......@@ -142,6 +143,11 @@ public class IndexerMappingServiceImpl extends MappingServiceImpl implements IMa
Map<String, Object> metaMapping = new HashMap<>();
Kind kind = new Kind(schema.getKind());
boolean bagOfWordsEnabled = this.featureFlagChecker.isFeatureEnabled(BAG_OF_WORDS_FEATURE_NAME);
if(bagOfWordsEnabled){
schema.getMetaSchema().put(BAG_OF_WORDS.getValue(), null);
}
for (Map.Entry<String, Object> entry : schema.getMetaSchema().entrySet()) {
if (entry.getKey() == RecordMetaAttribute.AUTHORITY.getValue()) {
metaMapping.put(entry.getKey(), TypeMapper.getMetaAttributeIndexerMapping(entry.getKey(), kind.getAuthority()));
......
......@@ -105,7 +105,6 @@ Feature: Indexing of the documents
@bag-of-words
Scenario Outline: Ingest record and Index bag of words as an attribute
When I ingest records with the <recordFile> with <acl> for a given <kind>
Then I reindex records of <kind>
Then I should be able to search <number> record with index <index> by extended data field <field> and value <value>
Examples:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment