Commit bbc091aa authored by Benoit Lavenier's avatar Benoit Lavenier

[fix] Fix <currency>/* index creation (failed because of currency field analyzer)

parent 8993bb12
Pipeline #7715 failed
......@@ -417,69 +417,69 @@ public class BlockDaoImpl extends AbstractDao implements BlockDao {
.startObject("properties")
// currency
.startObject("currency")
.startObject(BlockchainBlock.PROPERTY_CURRENCY)
.field("type", "string")
.endObject()
// version
.startObject("version")
.startObject(BlockchainBlock.PROPERTY_VERSION)
.field("type", "integer")
.endObject()
// time
.startObject("time")
.startObject(BlockchainBlock.PROPERTY_TIME)
.field("type", "long")
.endObject()
// medianTime
.startObject("medianTime")
.startObject(BlockchainBlock.PROPERTY_MEDIAN_TIME)
.field("type", "long")
.endObject()
// number
.startObject("number")
.startObject(BlockchainBlock.PROPERTY_NUMBER)
.field("type", "integer")
.endObject()
// nonce
.startObject("nonce")
.startObject(BlockchainBlock.PROPERTY_NONCE)
.field("type", "long")
.endObject()
// hash
.startObject("hash")
.startObject(BlockchainBlock.PROPERTY_HASH)
.field("type", "string")
.field("index", "not_analyzed")
.endObject()
// issuer
.startObject("issuer")
.startObject(BlockchainBlock.PROPERTY_ISSUER)
.field("type", "string")
.field("index", "not_analyzed")
.endObject()
// previous hash
.startObject("previousHash")
.startObject(BlockchainBlock.PROPERTY_PREVIOUS_HASH)
.field("type", "string")
.endObject()
// membersCount
.startObject("membersCount")
.startObject(BlockchainBlock.PROPERTY_MEMBERS_COUNT)
.field("type", "integer")
.endObject()
// unitbase
.startObject("unitbase")
.startObject(BlockchainBlock.PROPERTY_UNIT_BASE)
.field("type", "integer")
.endObject()
// monetaryMass
.startObject("monetaryMass")
.startObject(BlockchainBlock.PROPERTY_MONETARY_MASS)
.field("type", "long")
.endObject()
// dividend
.startObject("dividend")
.startObject(BlockchainBlock.PROPERTY_DIVIDEND)
.field("type", "integer")
.endObject()
......
......@@ -258,7 +258,7 @@ public class CurrencyDaoImpl extends AbstractIndexTypeDao<CurrencyExtendDao> imp
org.elasticsearch.common.settings.Settings indexSettings = org.elasticsearch.common.settings.Settings.settingsBuilder()
.put("number_of_shards", 3)
.put("number_of_replicas", 1)
//.put("analyzer", createDefaultAnalyzer())
.put("analyzer", pluginSettings.getDefaultStringAnalyzer())
.build();
createIndexRequestBuilder.setSettings(indexSettings);
createIndexRequestBuilder.addMapping(RECORD_TYPE, createTypeMapping());
......
......@@ -200,7 +200,6 @@ public class PendingMembershipDaoImpl extends AbstractDao implements PendingMemb
// currency
.startObject(WotPendingMembership.PROPERTY_CURRENCY)
.field("type", "string")
.field("index", "not_analyzed")
.endObject()
// membership
......
......@@ -50,6 +50,7 @@ import org.elasticsearch.common.inject.Injector;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* Created by Benoit on 30/03/2015.
......@@ -61,7 +62,7 @@ public class CurrencyService extends AbstractService {
private BlockchainRemoteService blockchainRemoteService;
private CurrencyExtendDao currencyDao;
private Map<String, IndexDao<?>> currencyDataDaos = new HashMap<>();
private Map<String, IndexDao<?>> currencyDataDaos = new ConcurrentHashMap<>();
private Injector injector;
@Inject
......
......@@ -29,7 +29,7 @@
<signatureVersion>1.0</signatureVersion>
<!-- Commons versions -->
<duniter4j.version>1.3.1</duniter4j.version>
<duniter4j.version>1.3.2</duniter4j.version>
<log4j.version>1.2.17</log4j.version>
<slf4j.version>1.7.6</slf4j.version>
<guava.version>22.0</guava.version>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment