| Chunk |
|---|
| Conflicting content |
|---|
public FileStore getFileStore(Path path) throws IOException {
return ESFileStore.getMatchingFileStore(path, fileStores);
}
<<<<<<< HEAD
=======
public URL resolveConfig(String path) throws FailedToResolveConfigException {
// first, try it as a path in the config directory
Path f = configFile.resolve(path);
if (Files.exists(f)) {
try {
return f.toUri().toURL();
} catch (MalformedURLException e) {
throw new FailedToResolveConfigException("Failed to resolve path [" + f + "]", e);
}
}
// try and load it from the classpath directly
// TODO: remove this, callers can look up their own config on classpath
URL resource = getClass().getClassLoader().getResource(path);
if (resource != null) {
return resource;
}
// try and load it from the classpath with config/ prefix
if (!path.startsWith("config/")) {
resource = getClass().getClassLoader().getResource("config/" + path);
if (resource != null) {
return resource;
}
}
throw new FailedToResolveConfigException("Failed to resolve config path [" + path + "], tried config path [" + f + "] and classpath");
}
>>>>>>> 4010e7e9a7148d66d5fb3699c5a042053efea1f4
} |
| Solution content |
|---|
public FileStore getFileStore(Path path) throws IOException {
return ESFileStore.getMatchingFileStore(path, fileStores);
}
} |
| File |
|---|
| Environment.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
public void testCommonGramsAnalysis() throws IOException {
String json = "/org/elasticsearch/index/analysis/commongrams/commongrams.json";
Settings settings = Settings.settingsBuilder()
<<<<<<< HEAD
.loadFromClasspath("org/elasticsearch/index/analysis/commongrams/commongrams.json")
.put("path.home", createHome())
=======
.loadFromStream(json, getClass().getResourceAsStream(json))
.put("path.home", createTempDir().toString())
>>>>>>> 4010e7e9a7148d66d5fb3699c5a042053efea1f4
.build();
{
AnalysisService analysisService = AnalysisTestsHelper.createAnalysisServiceFromSettings(settings); |
| Solution content |
|---|
public void testCommonGramsAnalysis() throws IOException {
String json = "/org/elasticsearch/index/analysis/commongrams/commongrams.json";
Settings settings = Settings.settingsBuilder()
.loadFromStream(json, getClass().getResourceAsStream(json))
.put("path.home", createHome())
.build();
{
AnalysisService analysisService = AnalysisTestsHelper.createAnalysisServiceFromSettings(settings); |
| File |
|---|
| CommonGramsTokenFilterFactoryTests.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
public void testQueryModeCommonGramsAnalysis() throws IOException {
String json = "/org/elasticsearch/index/analysis/commongrams/commongrams_query_mode.json";
Settings settings = Settings.settingsBuilder()
<<<<<<< HEAD
.loadFromClasspath("org/elasticsearch/index/analysis/commongrams/commongrams_query_mode.json")
.put("path.home", createHome())
=======
.loadFromStream(json, getClass().getResourceAsStream(json))
.put("path.home", createTempDir().toString())
>>>>>>> 4010e7e9a7148d66d5fb3699c5a042053efea1f4
.build();
{
AnalysisService analysisService = AnalysisTestsHelper.createAnalysisServiceFromSettings(settings); |
| Solution content |
|---|
public void testQueryModeCommonGramsAnalysis() throws IOException {
String json = "/org/elasticsearch/index/analysis/commongrams/commongrams_query_mode.json";
Settings settings = Settings.settingsBuilder()
.loadFromStream(json, getClass().getResourceAsStream(json))
.put("path.home", createHome())
.build();
{
AnalysisService analysisService = AnalysisTestsHelper.createAnalysisServiceFromSettings(settings); |
| File |
|---|
| CommonGramsTokenFilterFactoryTests.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
@Test
public void testSynonymsAnalysis() throws IOException {
<<<<<<< HEAD
InputStream synonyms = getClass().getResourceAsStream("synonyms.txt");
InputStream synonymsWordnet = getClass().getResourceAsStream("synonyms_wordnet.txt");
Path home = createTempDir();
Path config = home.resolve("config");
Files.createDirectory(config);
Files.copy(synonyms, config.resolve("synonyms.txt"));
Files.copy(synonymsWordnet, config.resolve("synonyms_wordnet.txt"));
Settings settings = settingsBuilder().
loadFromClasspath("org/elasticsearch/index/analysis/synonyms/synonyms.json")
.put("path.home", home)
=======
String json = "/org/elasticsearch/index/analysis/synonyms/synonyms.json";
Settings settings = settingsBuilder().
loadFromStream(json, getClass().getResourceAsStream(json))
.put("path.home", createTempDir().toString())
>>>>>>> 4010e7e9a7148d66d5fb3699c5a042053efea1f4
.put(IndexMetaData.SETTING_VERSION_CREATED, Version.CURRENT).build();
Index index = new Index("test"); |
| Solution content |
|---|
@Test
public void testSynonymsAnalysis() throws IOException {
InputStream synonyms = getClass().getResourceAsStream("synonyms.txt");
InputStream synonymsWordnet = getClass().getResourceAsStream("synonyms_wordnet.txt");
Path home = createTempDir();
Path config = home.resolve("config");
Files.createDirectory(config);
Files.copy(synonyms, config.resolve("synonyms.txt"));
Files.copy(synonymsWordnet, config.resolve("synonyms_wordnet.txt"));
String json = "/org/elasticsearch/index/analysis/synonyms/synonyms.json";
Settings settings = settingsBuilder().
loadFromStream(json, getClass().getResourceAsStream(json))
.put("path.home", home)
.put(IndexMetaData.SETTING_VERSION_CREATED, Version.CURRENT).build();
Index index = new Index("test"); |
| File |
|---|
| SynonymsAnalysisTest.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
<<<<<<< HEAD
public AnalysisService createAnalysisService() throws IOException {
InputStream empty_dict = getClass().getResourceAsStream("empty_user_dict.txt");
InputStream dict = getClass().getResourceAsStream("user_dict.txt");
Path home = createTempDir();
Path config = home.resolve("config");
Files.createDirectory(config);
Files.copy(empty_dict, config.resolve("empty_user_dict.txt"));
Files.copy(dict, config.resolve("user_dict.txt"));
Settings settings = Settings.settingsBuilder()
.put("path.home", home)
.loadFromClasspath("org/elasticsearch/index/analysis/kuromoji_analysis.json")
=======
public AnalysisService createAnalysisService() {
String json = "/org/elasticsearch/index/analysis/kuromoji_analysis.json";
Settings settings = Settings.settingsBuilder()
.put("path.home", createTempDir())
.loadFromStream(json, getClass().getResourceAsStream(json))
>>>>>>> 4010e7e9a7148d66d5fb3699c5a042053efea1f4
.put(IndexMetaData.SETTING_VERSION_CREATED, Version.CURRENT)
.build();
|
| Solution content |
|---|
}
public AnalysisService createAnalysisService() throws IOException {
InputStream empty_dict = getClass().getResourceAsStream("empty_user_dict.txt");
InputStream dict = getClass().getResourceAsStream("user_dict.txt");
Path home = createTempDir();
Path config = home.resolve("config");
Files.createDirectory(config);
Files.copy(empty_dict, config.resolve("empty_user_dict.txt"));
Files.copy(dict, config.resolve("user_dict.txt"));
String json = "/org/elasticsearch/index/analysis/kuromoji_analysis.json";
Settings settings = Settings.settingsBuilder()
.put("path.home", home)
.loadFromStream(json, getClass().getResourceAsStream(json))
.put(IndexMetaData.SETTING_VERSION_CREATED, Version.CURRENT)
.build();
|
| File |
|---|
| KuromojiAnalysisTests.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Method invocation |
| Method signature |
| Variable |