@@ -38,7 +38,7 @@ public class MapperTestUtils {
38
38
39
39
public static AnalysisRegistry analysisService (Settings customSettings ) throws IOException {
40
40
Settings settings = Settings .builder ()
41
- .put ("path.home" , System .getProperty ("path.home" , "/tmp" ))
41
+ .put ("path.home" , System .getProperty ("path.home" , System . getProperty ( "user.dir" ) ))
42
42
.put (IndexMetaData .SETTING_VERSION_CREATED , Version .CURRENT )
43
43
.put (customSettings )
44
44
.build ();
@@ -53,7 +53,7 @@ public static DocumentMapperParser newDocumentMapperParser(String index) throws
53
53
54
54
public static DocumentMapperParser newDocumentMapperParser (Settings customSettings , String index ) throws IOException {
55
55
Settings settings = Settings .builder ()
56
- .put ("path.home" , System .getProperty ("path.home" , "/tmp" ))
56
+ .put ("path.home" , System .getProperty ("path.home" , System . getProperty ( "user.dir" ) ))
57
57
.put (IndexMetaData .SETTING_VERSION_CREATED , Version .CURRENT )
58
58
.put (customSettings )
59
59
.build ();
@@ -90,7 +90,7 @@ public static DocumentMapperParser newDocumentMapperParser(Settings customSettin
90
90
public static Analyzer analyzer (String name ) throws IOException {
91
91
Settings settings = Settings .builder ()
92
92
.put (IndexMetaData .SETTING_VERSION_CREATED , Version .CURRENT )
93
- .put ("path.home" , System .getProperty ("path.home" ))
93
+ .put ("path.home" , System .getProperty ("path.home" , System . getProperty ( "user.dir" ) ))
94
94
.build ();
95
95
AnalysisRegistry analysisRegistry = analysisService (settings );
96
96
IndexMetaData indexMetaData = IndexMetaData .builder ("test" )
@@ -114,7 +114,7 @@ public static Analyzer analyzer(String name) throws IOException {
114
114
public static Analyzer analyzer (Settings customSettings , String name ) throws IOException {
115
115
Settings settings = Settings .builder ()
116
116
.put (IndexMetaData .SETTING_VERSION_CREATED , Version .CURRENT )
117
- .put ("path.home" , System .getProperty ("path.home" , "/tmp" ))
117
+ .put ("path.home" , System .getProperty ("path.home" , System . getProperty ( "user.dir" ) ))
118
118
.put (customSettings )
119
119
.build ();
120
120
AnalysisRegistry analysisRegistry = analysisService (settings );
@@ -139,7 +139,7 @@ public static Analyzer analyzer(Settings customSettings, String name) throws IOE
139
139
public static Analyzer analyzer (String resource , String name ) throws IOException {
140
140
Settings settings = Settings .builder ()
141
141
.put (IndexMetaData .SETTING_VERSION_CREATED , Version .CURRENT )
142
- .put ("path.home" , System .getProperty ("path.home" , "/tmp" ))
142
+ .put ("path.home" , System .getProperty ("path.home" , System . getProperty ( "user.dir" ) ))
143
143
.loadFromStream (resource , MapperTestUtils .class .getClassLoader ().getResource (resource ).openStream ())
144
144
.build ();
145
145
AnalysisRegistry analysisRegistry = analysisService (settings );
@@ -164,7 +164,7 @@ public static Analyzer analyzer(String resource, String name) throws IOException
164
164
public static TokenizerFactory tokenizerFactory (String name ) throws IOException {
165
165
Settings settings = Settings .builder ()
166
166
.put (IndexMetaData .SETTING_VERSION_CREATED , Version .CURRENT )
167
- .put ("path.home" , System .getProperty ("path.home" , "/tmp" ))
167
+ .put ("path.home" , System .getProperty ("path.home" , System . getProperty ( "user.dir" ) ))
168
168
.build ();
169
169
AnalysisRegistry analysisRegistry = analysisService (settings );
170
170
IndexMetaData indexMetaData = IndexMetaData .builder ("test" )
@@ -183,7 +183,7 @@ public static TokenizerFactory tokenizerFactory(String name) throws IOException
183
183
public static TokenizerFactory tokenizerFactory (String resource , String name ) throws IOException {
184
184
Settings settings = Settings .builder ()
185
185
.put (IndexMetaData .SETTING_VERSION_CREATED , Version .CURRENT )
186
- .put ("path.home" , System .getProperty ("path.home" ))
186
+ .put ("path.home" , System .getProperty ("path.home" , System . getProperty ( "user.dir" ) ))
187
187
.loadFromStream (resource , MapperTestUtils .class .getClassLoader ().getResource (resource ).openStream ())
188
188
.build ();
189
189
Environment environment = new Environment (settings );
@@ -204,7 +204,7 @@ public static TokenizerFactory tokenizerFactory(String resource, String name) th
204
204
public static TokenFilterFactory tokenFilterFactory (String name ) throws IOException {
205
205
Settings settings = Settings .builder ()
206
206
.put (IndexMetaData .SETTING_VERSION_CREATED , Version .CURRENT )
207
- .put ("path.home" , System .getProperty ("path.home" , "/tmp" ))
207
+ .put ("path.home" , System .getProperty ("path.home" , System . getProperty ( "user.dir" ) ))
208
208
.build ();
209
209
Environment environment = new Environment (settings );
210
210
AnalysisRegistry analysisRegistry = analysisService (settings );
@@ -222,7 +222,7 @@ public static TokenFilterFactory tokenFilterFactory(String name) throws IOExcept
222
222
public static TokenFilterFactory tokenFilterFactory (String resource , String name ) throws IOException {
223
223
Settings settings = Settings .builder ()
224
224
.put (IndexMetaData .SETTING_VERSION_CREATED , Version .CURRENT )
225
- .put ("path.home" , System .getProperty ("path.home" , "/tmp" ))
225
+ .put ("path.home" , System .getProperty ("path.home" , System . getProperty ( "user.dir" ) ))
226
226
.loadFromStream (resource , MapperTestUtils .class .getClassLoader ().getResource (resource ).openStream ())
227
227
.build ();
228
228
Environment environment = new Environment (settings );
@@ -241,7 +241,7 @@ public static TokenFilterFactory tokenFilterFactory(String resource, String name
241
241
public static CharFilterFactory charFilterFactory (String name ) throws IOException {
242
242
Settings settings = Settings .builder ()
243
243
.put (IndexMetaData .SETTING_VERSION_CREATED , Version .CURRENT )
244
- .put ("path.home" , System .getProperty ("path.home" , "/tmp" ))
244
+ .put ("path.home" , System .getProperty ("path.home" , System . getProperty ( "user.dir" ) ))
245
245
.build ();
246
246
Environment environment = new Environment (settings );
247
247
AnalysisRegistry analysisRegistry = analysisService (settings );
@@ -259,7 +259,7 @@ public static CharFilterFactory charFilterFactory(String name) throws IOExceptio
259
259
public static CharFilterFactory charFilterFactory (String resource , String name ) throws IOException {
260
260
Settings settings = Settings .builder ()
261
261
.put (IndexMetaData .SETTING_VERSION_CREATED , Version .CURRENT )
262
- .put ("path.home" , System .getProperty ("path.home" , "/tmp" ))
262
+ .put ("path.home" , System .getProperty ("path.home" , System . getProperty ( "user.dir" ) ))
263
263
.loadFromStream (resource , MapperTestUtils .class .getClassLoader ().getResource (resource ).openStream ())
264
264
.build ();
265
265
Environment environment = new Environment (settings );
0 commit comments