Comments (9)
Did you add nori?
from elasticsearch-cluster-runner.
@marevol
yes i have a nori
@Override
public Map<String, AnalysisModule.AnalysisProvider<TokenFilterFactory>> getTokenFilters() {
Map<String, AnalysisModule.AnalysisProvider<TokenFilterFactory>> extra = new HashMap<>();
extra.put("nori_part_of_speech", NoriPartOfSpeechStopFilterFactory::new);
extra.put("nori_readingform", NoriReadingFormFilterFactory::new);
extra.put("nori_number", NoriNumberFilterFactory::new);
return extra;
}
@Override
public Map<String, AnalysisModule.AnalysisProvider<TokenizerFactory>> getTokenizers() {
final Map<String, AnalysisModule.AnalysisProvider<TokenizerFactory>> extra = new HashMap();
extra.put("reloadable_nori_tokenizer", ReloadableNoriTokenizerFactory::new);
extra.put("nori_tokenizer", NoriTokenizerFactory::new);
return extra;
}
from elasticsearch-cluster-runner.
@marevol
I know you are very busy, but please ask when you can!
from elasticsearch-cluster-runner.
How did you send the mappings.json?
from elasticsearch-cluster-runner.
@marevol
For reference, there was no problem when creating an index directly on es.
thank u
{
"settings": {
"index": {
"analysis": {
"tokenizer": {
"korean_nori_tokenizer": {
"type": "reloadable_nori_tokenizer",
"decompound_mode": "discard"
}
},
"analyzer": {
"my_nori_analyzer": {
"tokenizer": "korean_nori_tokenizer",
"filter": [
"my_nori_filter"
]
}
},
"filter": {
"my_nori_filter": {
"type": "nori_part_of_speech",
"stoptags": [
"SP"
],
"updateable": true
}
}
}
}
},
"mappings": {
"properties": {
"test": {
"type": "keyword",
"fields": {
"nori": {
"search_analyzer": "my_nori_analyzer",
"analyzer": "my_nori_analyzer",
"type": "text"
}
}
}
}
}
}
from elasticsearch-cluster-runner.
Could you provide information to reproduce it?
from elasticsearch-cluster-runner.
package org.elasticsearch.plugin.analyzerTest;
import java.io.File;
import junit.framework.TestCase;
import org.codelibs.elasticsearch.runner.ElasticsearchClusterRunner;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.node.Node;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class ReloadableNoriTokenizerFactoryTest extends TestCase {
private ElasticsearchClusterRunner runner;
private int numOfNode = 1;
private File[] keywordFiles;
private String clusterName;
@Before
public void setUp() throws Exception {
clusterName = "es-analysisja-" + System.currentTimeMillis();
runner = new ElasticsearchClusterRunner();
runner.onBuild(new ElasticsearchClusterRunner.Builder() {
@Override
public void build(final int number, final Settings.Builder settingsBuilder) {
settingsBuilder.put("http.cors.enabled", true);
settingsBuilder.put("http.cors.allow-origin", "*");
settingsBuilder.put("discovery.type", "single-node");
// settingsBuilder.putList("discovery.seed_hosts", "127.0.0.1:9301");
// settingsBuilder.putList("cluster.initial_master_nodes", "127.0.0.1:9301");
}
}).build(new ElasticsearchClusterRunner.Configs().clusterName(clusterName).numOfNode(numOfNode));
keywordFiles = null;
}
@After
public void cleanUp() throws Exception {
runner.close();
runner.clean();
if (keywordFiles != null) {
for (File file : keywordFiles) {
file.deleteOnExit();
}
}
}
@Test
public void test_basic() throws Exception {
runner.ensureYellow();
Node node = runner.node();
final String index = "dataset";
final String indexSettings = "{\n" +
"" +
" \"mappings\": {\n" +
" \"properties\": {\n" +
" \"hahahoho\": {\n" +
" \"type\": \"keyword\"\n" +
" }\n" +
" }\n" +
" }\n" +
"}";
runner.createIndex(index, Settings.builder().loadFromSource(indexSettings, XContentType.JSON).build());
runner.ensureYellow();
}
}
I tried with a simple code, but this doesn't work either
Am I unable to load the default plugin?
unknown setting [index.mappings.properties.hahahoho.type] please check that any required plugins are installed, or check the breaking changes documentation for removed settings
java.lang.IllegalArgumentException: unknown setting [index.mappings.properties.hahahoho.type] please check that any required plugins are installed, or check the breaking changes documentation for removed settings
from elasticsearch-cluster-runner.
It's for an index setting, not mapping.
final String indexSettings = "{\n" +
" \"properties\": {\n" +
" \"hahahoho\": {\n" +
" \"type\": \"keyword\"\n" +
" }\n" +
" }\n" +
"}";
runner.createIndex(index, builder -> builder.addMapping("_doc",
indexSettings, XContentType.JSON));
from elasticsearch-cluster-runner.
@marevol
From what you tested elsewhere, I think you should remove the settings property and set it up.
Is it impossible to test until data is mapped and retrieved?
from elasticsearch-cluster-runner.
Related Issues (20)
- Improve error messages on flush/refresh
- Improve optimze/upgrade methods
- All shards are placed to the first node HOT 3
- cannot access org.elasticsearch.action.admin.indices.mapping.put.PutMappingResponse HOT 11
- confPath is ignored for plugins HOT 2
- Is there a way to enable X-Pack features? HOT 2
- Releases for latest 5.x versions missing HOT 8
- Specifying jvm.options file HOT 2
- Do not use log4j implementation classes to allows us use diferent logging engines. HOT 1
- Nodes created cannot ingest by default HOT 1
- latest version problem HOT 8
- Release for latest 6.x version HOT 2
- close > clean on Windows 10 leave cluster log files behind HOT 1
- cluster-runner 7.16.3 causes NPE, can't find plugin HOT 3
- Performance problem in MacOS and JVMs newer than 8 HOT 1
- Delete-by-query problem in 7.17.1 HOT 1
- java.lang.NoClassDefFoundError: org/elasticsearch/plugins/PluginType
- NPE when running the container with 'disableESLogger()' config HOT 2
- Sonatype Nexus cannot mirror CodeLibs Maven repository HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elasticsearch-cluster-runner.