File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
elasticsearch-client/src/main/java/fr/pilato/elasticsearch/crawler/fs/client Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -262,12 +262,19 @@ public String getVersion() throws ElasticsearchClientException {
262
262
minorVersion = extractMinorVersion (version );
263
263
serverless = false ;
264
264
265
- if ("serverless" .equals (document .read ("$.version.build_flavor" ))) {
266
- logger .debug ("We are running on Elastic serverless cloud so we can not consider version number." );
267
- serverless = true ;
268
- version = "serverless" ;
269
- majorVersion = 99 ;
270
- minorVersion = 999 ;
265
+ try {
266
+ if ("serverless" .equals (document .read ("$.version.build_flavor" ))) {
267
+ logger .debug ("We are running on Elastic serverless cloud so we can not consider version number." );
268
+ serverless = true ;
269
+ version = "serverless" ;
270
+ majorVersion = 99 ;
271
+ minorVersion = 999 ;
272
+ }
273
+ } catch (PathNotFoundException e ) {
274
+ // We are not running an official Elasticsearch version
275
+ logger .info ("FSCrawler only supports Elasticsearch official distribution. " +
276
+ "You are running another custom distribution. We will not be able to use some features like " +
277
+ "semantic search." );
271
278
}
272
279
logger .debug ("get version returns {} and {} as the major version number" , version , majorVersion );
273
280
return version ;
You can’t perform that action at this time.
0 commit comments