0%

npm analyzer project: part 5

config the npm file.

This project uses npm config for configuration. I need to create config/local.json5 file to override the configuration as necessary, especially to define githubTokens. After working a lot, I found I need to clone the npm-analyzer repo actuallya. I do not know whether the work before is worthable if I already clone the whole repo.

clone the github npm-analyzer

under my npm_analyzer dirctory, clone the repo to my local machine.

1
git clone https://github.com/npms-io/npms-analyzer.git

copy the default.json file to create my own local.json5 file

1
$ cp default.json local.json5
1
2
3
4
5
6
7
8
vagrant@cli:~/npm_analyzer/npms-analyzer/config$ ls -al
total 24
drwxr-xr-x 4 vagrant vagrant 4096 Nov 7 07:19 .
drwxr-xr-x 9 vagrant vagrant 4096 Nov 7 05:38 ..
drwxr-xr-x 2 vagrant vagrant 4096 Nov 7 05:31 couchdb
-rw-r--r-- 1 vagrant vagrant 1187 Nov 7 05:31 default.json5
drwxr-xr-x 2 vagrant vagrant 4096 Nov 7 05:31 elasticsearch
-rw-r--r-- 1 vagrant vagrant 116 Nov 7 05:47 local.json5

create my githubtoken, write it to local.json5 file

1
2
3
4
{
// Github tokens to be used by token-dealer
githubTokens: ['227dc6ab8270d13f5ac2134c466'],
}

check default.json file

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
// Databases & similar stuff
couchdbNpm: {
url: 'http://admin:admin@127.0.0.1:5984/npm',
requestDefaults: { timeout: 15000 },
},
couchdbNpms: {
url: 'http://admin:admin@127.0.0.1:5984/npms',
requestDefaults: { timeout: 15000 },
},
elasticsearch: {
host: 'http://127.0.0.1:9200',
requestTimeout: 15000,
apiVersion: '6.3',
log: null,
},
queue: {
name: 'npms',
addr: 'amqp://guest:guest@127.0.0.1',
options: { maxPriority: 1 },
},

// List of packages that will be ignored by the CLI consume command (analysis process)
blacklist: {
'hownpm': 'Invalid version: 1.01',
'zachtestproject1': 'Test project that makes registry return 500 internal',
'zachtestproject2': 'Test project that makes registry return 500 internal',
'zachtestproject3': 'Test project that makes registry return 500 internal',
'zachtestproject4': 'Test project that makes registry return 500 internal',
'broken-package-truncated-tar-header': 'Broken tarball',
},

// Github tokens to be used by token-dealer
githubTokens: [],
}

after checking default.json file, I found there are two databases, one is couchdbNpms which is for queue, and another one is couchdbNpm which is for replication from https://replicate.npmjs.com/registry. I only created npms, so I need to go back couchdb to create npm database and redo the replication work. It takes long time to replication the couchdb and also shows “error” for replication funtion on couchdb website.

Note:
Since I am working my project on cloud, I need to use ssh tunnel to log in http website to work on couchdb and rabbitmq and elasticsearch.

1
2
3
4
ssh -L localhost:5984:localhost:5984 ubuntu@ipaddress   # open couchdb
ssh -L localhost:8080:localhost:15672 ubuntu@ipaddress # open rabbitMQ
ssh -L localhost:9100:localhost:9100 ubuntu@ipaddress # open elasticsearch
ssh -L localhost:9200:localhost:9200 ubuntu@ipaddress # open elasticsearch

after tunnel, it will show like this

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
anna@ubuntu1804:~/anna_tech_blog/newblog/source/_posts$ ssh -L localhost:8080:localhost:15672 ubuntu@ip address
Welcome to Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-1026-oracle x86_64)

* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage

System information disabled due to load higher than 2.0

* Kata Containers are now fully integrated in Charmed Kubernetes 1.16!
Yes, charms take the Krazy out of K8s Kata Kluster Konstruction.

https://ubuntu.com/kubernetes/docs/release-notes

* Canonical Livepatch is available for installation.
- Reduce system reboots and improve kernel security. Activate at:
https://ubuntu.com/livepatch

55 packages can be updated.
0 updates are security updates.


*** System restart required ***
Last login: Tue Nov 19 19:47:26 2019 from ip address

login

database

active task

There are something wrong with replication, so the verification shows error

then login the rabbtMQ

login the elasticsearch

npms-analyzer observe

The observe command starts observing changes that occur in the npm registry as well as packages that were not analyzed for a while. Each reported package will be pushed into a queue to be processed by the queue consumers.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
vagrant@cli:~/npm_analyzer/npms-analyzer$ ./cli.js observe --log-level debug | pino-pretty
[1574225327914] INFO (npms-analyzer/31902 on cli): RabbitMQ connect and setup done successfully
module: "queue"
[1574225327942] DEBUG (npms-analyzer/31902 on cli): Queue is ready
module: "bootstrap"
[1574225334791] DEBUG (npms-analyzer/31902 on cli): CouchDB for npm is ready
module: "bootstrap"
[1574225338107] DEBUG (npms-analyzer/31902 on cli): CouchDB for npms is ready
module: "bootstrap"
[1574225338118] INFO (npms-analyzer/31902 on cli): Starting realtime observer..
module: "observer/realtime"
[1574225338135] INFO (npms-analyzer/31902 on cli): Starting stale observer..
module: "observer/stale"
[1574225338149] DEBUG (npms-analyzer/31902 on cli): Looking for stale packages (failed)..
module: "observer/stale"
[1574225343426] INFO (npms-analyzer/31902 on cli): Will now start to follow changes since 513900-g1AAAAI7eJzLYWBg4MhgTmHgzcvPy09JdcjLz8gvLskBCjMlMiTJ____PyuDOYmBkXF9LlCM3TIl2STV0hJdPQ4TkhSAZJI9zBCGf0vBhhgZWSaZJqUQa4gDyJB4uCF_2cGGmKQYmlkYGBNrSALIkHq4Ib-yIS4xNDVKtTQk0pA8FiDJ0ACkgObMhxj04zzENYamppbmpBm0AGLQfqhBjWCDDI3MjC1NzEky6ADEoPtQgy6CDTI2ME5MMTMgyaAHEIOgYfS1FWyQuYlpqqFZIrq2LAD-NLFU
module: "observer/realtime"
since: "513900-g1AAAAI7eJzLYWBg4MhgTmHgzcvPy09JdcjLz8gvLskBCjMlMiTJ____PyuDOYmBkXF9LlCM3TIl2STV0hJdPQ4TkhSAZJI9zBCGf0vBhhgZWSaZJqUQa4gDyJB4uCF_2cGGmKQYmlkYGBNrSALIkHq4Ib-yIS4xNDVKtTQk0pA8FiDJ0ACkgObMhxj04zzENYamppbmpBm0AGLQfqhBjWCDDI3MjC1NzEky6ADEoPtQgy6CDTI2ME5MMTMgyaAHEIOgYfS1FWyQuYlpqqFZIrq2LAD-NLFU"
[1574225348422] DEBUG (npms-analyzer/31902 on cli): Flushing changes buffer with a total of 250 changes..
module: "observer/realtime"
[1574225353118] INFO (npms-analyzer/31902 on cli): pid: 31902; memory: 24.00 MB; uptime: 51 seconds
module: "stats/process"
[1574225353213] ERROR (npms-analyzer/31902 on cli): Stale observer failed when notifying stale packages (failed)
module: "observer/stale"
err: {
"type": "Error",
"message": "error happened in your connection",
"stack":
Error: error happened in your connection
at ClientRequest.<anonymous> (/home/vagrant/npm_analyzer/npms-analyzer/node_modules/request/request.js:816:19)
at Object.onceWrapper (events.js:286:20)
at ClientRequest.emit (events.js:198:13)
at Socket.emitRequestTimeout (_http_client.js:662:40)
at Object.onceWrapper (events.js:286:20)
at Socket.emit (events.js:198:13)
at Socket._onTimeout (net.js:442:8)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)
From previous event:
at RowsReaderStream._queryFn (/home/vagrant/npm_analyzer/npms-analyzer/node_modules/couchdb-iterator/index.js:48:16)
at RowsReaderStream._read (/home/vagrant/npm_analyzer/npms-analyzer/node_modules/couchdb-iterator/lib/rowsReader.js:23:14)
at RowsReaderStream.Readable.read (_stream_readable.js:470:10)
at resume_ (_stream_readable.js:949:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
"name": "Error",
"scope": "socket",
"errid": "request",
"code": "ESOCKETTIMEDOUT",
"connect": false,
"description": "ESOCKETTIMEDOUT",
"stacktrace": [
"Error: ESOCKETTIMEDOUT",
" at ClientRequest.<anonymous> (/home/vagrant/npm_analyzer/npms-analyzer/node_modules/request/request.js:816:19)",
" at Object.onceWrapper (events.js:286:20)",
" at ClientRequest.emit (events.js:198:13)",
" at Socket.emitRequestTimeout (_http_client.js:662:40)",
" at Object.onceWrapper (events.js:286:20)",
" at Socket.emit (events.js:198:13)",
" at Socket._onTimeout (net.js:442:8)",
" at ontimeout (timers.js:436:11)",
" at tryOnTimeout (timers.js:300:5)",
" at listOnTimeout (timers.js:263:5)",
" at Timer.processTimers (timers.js:223:10)"
]
}
[1574225353248] DEBUG (npms-analyzer/31902 on cli): Looking for stale packages (normal)..
module: "observer/stale"
[1574225353270] INFO (npms-analyzer/31902 on cli): Queue stat
module: "stats/queue"
stat: {
"messageCount": 498961,
"consumerCount": 0
}

it shows queue first successed, but failed after for some reason.

error message

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
[1574225383774] INFO  (npms-analyzer/31902 on cli): Starting realtime observer..
module: "observer/realtime"
[1574225383786] ERROR (npms-analyzer/31902 on cli): Realtime observer failed, restarting in a few moments..
module: "observer/realtime"
err: {
"type": "OperationalError",
"message": "error happened in your connection",
"stack":
Error: error happened in your connection
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
From previous event:
at RealtimeObserver._fetchLastSeq (/home/vagrant/npm_analyzer/npms-analyzer/lib/observers/realtime.js:123:31)
at RealtimeObserver._start (/home/vagrant/npm_analyzer/npms-analyzer/lib/observers/realtime.js:79:14)
at Timeout._restartTimeout.setTimeout [as _onTimeout] (/home/vagrant/npm_analyzer/npms-analyzer/lib/observers/realtime.js:89:22)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)
"cause": {
"type": "Error",
"message": "error happened in your connection",
"stack":
Error: connect ECONNREFUSED 127.0.0.1:5984
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
"name": "Error",
"scope": "socket",
"errid": "request",
"errno": "ECONNREFUSED",
"code": "ECONNREFUSED",
"syscall": "connect",
"address": "127.0.0.1",
"port": 5984,
"description": "connect ECONNREFUSED 127.0.0.1:5984",
"stacktrace": [
"Error: connect ECONNREFUSED 127.0.0.1:5984",
" at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)"
]
},
"isOperational": true,
"scope": "socket",
"errid": "request",
"errno": "ECONNREFUSED",
"code": "ECONNREFUSED",
"syscall": "connect",
"address": "127.0.0.1",
"port": 5984,
"description": "connect ECONNREFUSED 127.0.0.1:5984",
"stacktrace": [
"Error: connect ECONNREFUSED 127.0.0.1:5984",
" at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)"
]
}

npms-analyzer consume

The consume command starts consuming the queue, running the analysis process for each queued package.

Since the first step is failed, this step also failed.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
vagrant@cli:~/npm_analyzer/npms-analyzer$ ./cli.js consume --log-level debug --concurrency 5 | pino-pretty
[1574225672854] WARN (npms-analyzer/32491 on cli): Check of npm failed
module: "bootstrap"
err: {
"type": "OperationalError",
"message": "error happened in your connection",
"stack":
Error: error happened in your connection
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
From previous event:
at promiseRetry (/home/vagrant/npm_analyzer/npms-analyzer/cmd/util/bootstrap.js:68:20)
at /home/vagrant/npm_analyzer/npms-analyzer/node_modules/promise-retry/index.js:29:24
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
From previous event:
at RetryOperation._fn (/home/vagrant/npm_analyzer/npms-analyzer/node_modules/promise-retry/index.js:28:14)
at RetryOperation.attempt (/home/vagrant/npm_analyzer/npms-analyzer/node_modules/retry/lib/retry_operation.js:97:8)
at /home/vagrant/npm_analyzer/npms-analyzer/node_modules/promise-retry/index.js:26:19
From previous event:
at promiseRetry (/home/vagrant/npm_analyzer/npms-analyzer/node_modules/promise-retry/index.js:25:12)
at bootstrapCouchdb (/home/vagrant/npm_analyzer/npms-analyzer/cmd/util/bootstrap.js:67:12)
at Promise.map (/home/vagrant/npm_analyzer/npms-analyzer/cmd/util/bootstrap.js:37:20)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
From previous event:
at bootstrap (/home/vagrant/npm_analyzer/npms-analyzer/cmd/util/bootstrap.js:33:20)
at Object.exports.handler (/home/vagrant/npm_analyzer/npms-analyzer/cmd/consume.js:105:5)
at Object.runCommand (/home/vagrant/npm_analyzer/npms-analyzer/node_modules/yargs/lib/command.js:238:44)
at Object.parseArgs [as _parseArgs] (/home/vagrant/npm_analyzer/npms-analyzer/node_modules/yargs/yargs.js:1063:30)
at Object.get [as argv] (/home/vagrant/npm_analyzer/npms-analyzer/node_modules/yargs/yargs.js:1004:21)
at Object.<anonymous> (/home/vagrant/npm_analyzer/npms-analyzer/cli.js:32:1)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
"cause": {
"type": "Error",
"message": "error happened in your connection",
"stack":
Error: connect ECONNREFUSED 127.0.0.1:5984
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
"name": "Error",
"scope": "socket",
"errid": "request",
"errno": "ECONNREFUSED",
"code": "ECONNREFUSED",
"syscall": "connect",
"address": "127.0.0.1",
"port": 5984,
"description": "connect ECONNREFUSED 127.0.0.1:5984",
"stacktrace": [
"Error: connect ECONNREFUSED 127.0.0.1:5984",
" at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)"
]
},
"isOperational": true,
"scope": "socket",
"errid": "request",
"errno": "ECONNREFUSED",
"code": "ECONNREFUSED",
"syscall": "connect",
"address": "127.0.0.1",
"port": 5984,
"description": "connect ECONNREFUSED 127.0.0.1:5984",
"stacktrace": [
"Error: connect ECONNREFUSED 127.0.0.1:5984",
" at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)"
]
}

npms-analyzer scoring

The scoring command, continuously iterates over the analysis results and calculates a score for all the npm packages, storing its result in elasticsearch.

I will try to run the last command.

1
2
vagrant@cli:~/npm_analyzer/npms-analyzer$ ./cli.js scoring
{"level":60,"time":1574226093326,"pid":803,"hostname":"cli","name":"npms-analyzer","module":"cli/scoring","err":{"msg":"[mapper_parsing_exception] Root mapping definition has unsupported parameters: [score : {dynamic=false, _all={enabled=false}, properties={evaluation={type=object, properties={popularity={type=object, properties={downloadsCount={index=false, type=double}, dependentsCount={index=false, type=double}, communityInterest={index=false, type=double}, downloadsAcceleration={index=false, type=double}}}, maintenance={type=object, properties={releasesFrequency={index=false, type=double}, commitsFrequency={index=false, type=double}, issuesDistribution={index=false, type=double}, openIssues={index=false, type=double}}}, quality={type=object, properties={tests={index=false, type=double}, branding={index=false, type=double}, health={index=false, type=double}, carefulness={index=false, type=double}}}}}, score={type=object, properties={final={type=double}, detail={type=object, properties={popularity={type=double}, maintenance={type=double}, quality={type=double}}}}}, package={type=object, properties={date={index=false, type=date}, maintainers={type=object, properties={email={normalizer=raw, type=keyword}, username={normalizer=raw, type=keyword}}}, keywords={type=text, fields={standard={analyzer=standard, type=text}, english={analyzer=package_english, type=text}, raw={analyzer=raw, type=text}, english_aggressive={analyzer=package_english_aggressive, type=text}, edge_ngram={search_analyzer=package, analyzer=package_edge_ngram, type=text}}}, author={type=object, properties={name={normalizer=raw, type=keyword}, email={normalizer=raw, type=keyword}, url={index=false, type=text}, username={normalizer=raw, type=keyword}}}, scope={normalizer=raw, type=keyword}, name={type=text, fields={standard={analyzer=standard, type=text}, autocomplete={search_analyzer=package, analyzer=package_autocomplete, type=text}, english={analyzer=package_english, type=text}, raw={normalizer=raw, type=keyword}, english_aggressive={analyzer=package_english_aggressive, type=text}, autocomplete_highlight={search_analyzer=package, analyzer=package_autocomplete_highlight, type=text, index_options=offsets}, autocomplete_keyword={search_analyzer=package_autocomplete_keyword_search, analyzer=package_autocomplete_keyword, type=text}, edge_ngram={search_analyzer=package, analyzer=package_edge_ngram, type=text}}}, description={type=text, fields={standard={analyzer=standard, type=text}, english={analyzer=package_english, type=text}, english_aggressive={analyzer=package_english_aggressive, type=text}, edge_ngram={search_analyzer=package, analyzer=package_edge_ngram, type=text}}}, publisher={type=object, properties={email={index=false, type=text}, username={index=false, type=text}}}, links={type=object, properties={bugs={index=false, type=text}, npm={index=false, type=text}, repository={index=false, type=text}, homepage={index=false, type=text}}}, version={index=false, type=text}}}, flags={type=object, properties={unstable={type=boolean}, deprecated={type=text, index_options=docs}, insecure={type=integer}}}}}]","path":"/npms-1574226087671","query":{},"body":"{\"settings\":{\"number_of_shards\":1,\"number_of_replicas\":0,\"analysis\":{\"tokenizer\":{\"autocomplete\":{\"type\":\"edgeNGram\",\"min_gram\":\"1\",\"max_gram\":\"15\",\"token_chars\":[\"letter\",\"digit\"]}},\"filter\":{\"non_alfanum_to_space\":{\"type\":\"pattern_replace\",\"pattern\":\"(?i)[^a-z0-9]+\",\"replacement\":\" \"},\"split_word\":{\"type\":\"word_delimiter\",\"generate_word_parts\":true,\"generate_number_parts\":true,\"catenate_words\":false,\"catenate_numbers\":false,\"catenate_all\":false,\"split_on_case_change\":true,\"preserve_original\":true,\"split_on_numerics\":true,\"stem_english_possessive\":true},\"edge_ngram\":{\"type\":\"edgeNGram\",\"min_gram\":\"4\",\"max_gram\":\"15\"},\"autocomplete\":{\"type\":\"edgeNGram\",\"min_gram\":\"1\",\"max_gram\":\"15\"},\"unique_on_same_position\":{\"type\":\"unique\",\"only_on_same_position\":false}},\"analyzer\":{\"package\":{\"tokenizer\":\"standard\",\"filter\":[\"asciifolding\",\"split_word\",\"lowercase\",\"unique_on_same_position\"]},\"package_english\":{\"tokenizer\":\"standard\",\"filter\":[\"asciifolding\",\"split_word\",\"lowercase\",\"kstem\",\"unique_on_same_position\"]},\"package_english_aggressive\":{\"tokenizer\":\"standard\",\"filter\":[\"asciifolding\",\"split_word\",\"lowercase\",\"porter_stem\",\"unique_on_same_position\"]},\"package_edge_ngram\":{\"tokenizer\":\"standard\",\"filter\":[\"asciifolding\",\"split_word\",\"lowercase\",\"edge_ngram\",\"unique_on_same_position\"]},\"package_autocomplete\":{\"tokenizer\":\"standard\",\"filter\":[\"asciifolding\",\"split_word\",\"lowercase\",\"autocomplete\",\"unique_on_same_position\"]},\"package_autocomplete_keyword\":{\"tokenizer\":\"keyword\",\"filter\":[\"asciifolding\",\"non_alfanum_to_space\",\"lowercase\",\"autocomplete\",\"trim\",\"unique_on_same_position\"]},\"package_autocomplete_keyword_search\":{\"tokenizer\":\"keyword\",\"filter\":[\"asciifolding\",\"non_alfanum_to_space\",\"lowercase\",\"trim\"]},\"package_autocomplete_highlight\":{\"tokenizer\":\"autocomplete\",\"filter\":[\"asciifolding\",\"non_alfanum_to_space\",\"lowercase\",\"trim\"]},\"raw\":{\"tokenizer\":\"keyword\",\"filter\":[\"asciifolding\",\"lowercase\",\"trim\"]}},\"normalizer\":{\"raw\":{\"type\":\"custom\",\"filter\":[\"asciifolding\",\"lowercase\",\"trim\"]}}}},\"mappings\":{\"score\":{\"dynamic\":false,\"_all\":{\"enabled\":false},\"properties\":{\"package\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"text\",\"fields\":{\"standard\":{\"type\":\"text\",\"analyzer\":\"standard\"},\"english\":{\"type\":\"text\",\"analyzer\":\"package_english\"},\"english_aggressive\":{\"type\":\"text\",\"analyzer\":\"package_english_aggressive\"},\"edge_ngram\":{\"type\":\"text\",\"analyzer\":\"package_edge_ngram\",\"search_analyzer\":\"package\"},\"autocomplete\":{\"type\":\"text\",\"analyzer\":\"package_autocomplete\",\"search_analyzer\":\"package\"},\"autocomplete_highlight\":{\"type\":\"text\",\"analyzer\":\"package_autocomplete_highlight\",\"search_analyzer\":\"package\",\"index_options\":\"offsets\"},\"autocomplete_keyword\":{\"type\":\"text\",\"analyzer\":\"package_autocomplete_keyword\",\"search_analyzer\":\"package_autocomplete_keyword_search\"},\"raw\":{\"type\":\"keyword\",\"normalizer\":\"raw\"}}},\"description\":{\"type\":\"text\",\"fields\":{\"standard\":{\"type\":\"text\",\"analyzer\":\"standard\"},\"english\":{\"type\":\"text\",\"analyzer\":\"package_english\"},\"english_aggressive\":{\"type\":\"text\",\"analyzer\":\"package_english_aggressive\"},\"edge_ngram\":{\"type\":\"text\",\"analyzer\":\"package_edge_ngram\",\"search_analyzer\":\"package\"}}},\"keywords\":{\"type\":\"text\",\"fields\":{\"standard\":{\"type\":\"text\",\"analyzer\":\"standard\"},\"english\":{\"type\":\"text\",\"analyzer\":\"package_english\"},\"english_aggressive\":{\"type\":\"text\",\"analyzer\":\"package_english_aggressive\"},\"edge_ngram\":{\"type\":\"text\",\"analyzer\":\"package_edge_ngram\",\"search_analyzer\":\"package\"},\"raw\":{\"type\":\"text\",\"analyzer\":\"raw\"}}},\"version\":{\"type\":\"text\",\"index\":false},\"date\":{\"type\":\"date\",\"index\":false},\"links\":{\"type\":\"object\",\"properties\":{\"npm\":{\"type\":\"text\",\"index\":false},\"homepage\":{\"type\":\"text\",\"index\":false},\"repository\":{\"type\":\"text\",\"index\":false},\"bugs\":{\"type\":\"text\",\"index\":false}}},\"author\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"keyword\",\"normalizer\":\"raw\"},\"username\":{\"type\":\"keyword\",\"normalizer\":\"raw\"},\"email\":{\"type\":\"keyword\",\"normalizer\":\"raw\"},\"url\":{\"type\":\"text\",\"index\":false}}},\"publisher\":{\"type\":\"object\",\"properties\":{\"username\":{\"type\":\"text\",\"index\":false},\"email\":{\"type\":\"text\",\"index\":false}}},\"maintainers\":{\"type\":\"object\",\"properties\":{\"username\":{\"type\":\"keyword\",\"normalizer\":\"raw\"},\"email\":{\"type\":\"keyword\",\"normalizer\":\"raw\"}}},\"scope\":{\"type\":\"keyword\",\"normalizer\":\"raw\"}}},\"flags\":{\"type\":\"object\",\"properties\":{\"deprecated\":{\"type\":\"text\",\"index_options\":\"docs\"},\"insecure\":{\"type\":\"integer\"},\"unstable\":{\"type\":\"boolean\"}}},\"evaluation\":{\"type\":\"object\",\"properties\":{\"quality\":{\"type\":\"object\",\"properties\":{\"carefulness\":{\"type\":\"double\",\"index\":false},\"tests\":{\"type\":\"double\",\"index\":false},\"health\":{\"type\":\"double\",\"index\":false},\"branding\":{\"type\":\"double\",\"index\":false}}},\"popularity\":{\"type\":\"object\",\"properties\":{\"communityInterest\":{\"type\":\"double\",\"index\":false},\"downloadsCount\":{\"type\":\"double\",\"index\":false},\"downloadsAcceleration\":{\"type\":\"double\",\"index\":false},\"dependentsCount\":{\"type\":\"double\",\"index\":false}}},\"maintenance\":{\"type\":\"object\",\"properties\":{\"releasesFrequency\":{\"type\":\"double\",\"index\":false},\"commitsFrequency\":{\"type\":\"double\",\"index\":false},\"openIssues\":{\"type\":\"double\",\"index\":false},\"issuesDistribution\":{\"type\":\"double\",\"index\":false}}}}},\"score\":{\"type\":\"object\",\"properties\":{\"final\":{\"type\":\"double\"},\"detail\":{\"type\":\"object\",\"properties\":{\"quality\":{\"type\":\"double\"},\"popularity\":{\"type\":\"double\"},\"maintenance\":{\"type\":\"double\"}}}}}}}}}","statusCode":400,"response":"{\"error\":{\"root_cause\":[{\"type\":\"mapper_parsing_exception\",\"reason\":\"Root mapping definition has unsupported parameters: [score : {dynamic=false, _all={enabled=false}, properties={evaluation={type=object, properties={popularity={type=object, properties={downloadsCount={index=false, type=double}, dependentsCount={index=false, type=double}, communityInterest={index=false, type=double}, downloadsAcceleration={index=false, type=double}}}, maintenance={type=object, properties={releasesFrequency={index=false, type=double}, commitsFrequency={index=false, type=double}, issuesDistribution={index=false, type=double}, openIssues={index=false, type=double}}}, quality={type=object, properties={tests={index=false, type=double}, branding={index=false, type=double}, health={index=false, type=double}, carefulness={index=false, type=double}}}}}, score={type=object, properties={final={type=double}, detail={type=object, properties={popularity={type=double}, maintenance={type=double}, quality={type=double}}}}}, package={type=object, properties={date={index=false, type=date}, maintainers={type=object, properties={email={normalizer=raw, type=keyword}, username={normalizer=raw, type=keyword}}}, keywords={type=text, fields={standard={analyzer=standard, type=text}, english={analyzer=package_english, type=text}, raw={analyzer=raw, type=text}, english_aggressive={analyzer=package_english_aggressive, type=text}, edge_ngram={search_analyzer=package, analyzer=package_edge_ngram, type=text}}}, author={type=object, properties={name={normalizer=raw, type=keyword}, email={normalizer=raw, type=keyword}, url={index=false, type=text}, username={normalizer=raw, type=keyword}}}, scope={normalizer=raw, type=keyword}, name={type=text, fields={standard={analyzer=standard, type=text}, autocomplete={search_analyzer=package, analyzer=package_autocomplete, type=text}, english={analyzer=package_english, type=text}, raw={normalizer=raw, type=keyword}, english_aggressive={analyzer=package_english_aggressive, type=text}, autocomplete_highlight={search_analyzer=package, analyzer=package_autocomplete_highlight, type=text, index_options=offsets}, autocomplete_keyword={search_analyzer=package_autocomplete_keyword_search, analyzer=package_autocomplete_keyword, type=text}, edge_ngram={search_analyzer=package, analyzer=package_edge_ngram, type=text}}}, description={type=text, fields={standard={analyzer=standard, type=text}, english={analyzer=package_english, type=text}, english_aggressive={analyzer=package_english_aggressive, type=text}, edge_ngram={search_analyzer=package, analyzer=package_edge_ngram, type=text}}}, publisher={type=object, properties={email={index=false, type=text}, username={index=false, type=text}}}, links={type=object, properties={bugs={index=false, type=text}, npm={index=false, type=text}, repository={index=false, type=text}, homepage={index=false, type=text}}}, version={index=false, type=text}}}, flags={type=object, properties={unstable={type=boolean}, deprecated={type=text, index_options=docs}, insecure={type=integer}}}}}]\"}],\"type\":\"mapper_parsing_exception\",\"reason\":\"Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: [score : {dynamic=false, _all={enabled=false}, properties={evaluation={type=object, properties={popularity={type=object, properties={downloadsCount={index=false, type=double}, dependentsCount={index=false, type=double}, communityInterest={index=false, type=double}, downloadsAcceleration={index=false, type=double}}}, maintenance={type=object, properties={releasesFrequency={index=false, type=double}, commitsFrequency={index=false, type=double}, issuesDistribution={index=false, type=double}, openIssues={index=false, type=double}}}, quality={type=object, properties={tests={index=false, type=double}, branding={index=false, type=double}, health={index=false, type=double}, carefulness={index=false, type=double}}}}}, score={type=object, properties={final={type=double}, detail={type=object, properties={popularity={type=double}, maintenance={type=double}, quality={type=double}}}}}, package={type=object, properties={date={index=false, type=date}, maintainers={type=object, properties={email={normalizer=raw, type=keyword}, username={normalizer=raw, type=keyword}}}, keywords={type=text, fields={standard={analyzer=standard, type=text}, english={analyzer=package_english, type=text}, raw={analyzer=raw, type=text}, english_aggressive={analyzer=package_english_aggressive, type=text}, edge_ngram={search_analyzer=package, analyzer=package_edge_ngram, type=text}}}, author={type=object, properties={name={normalizer=raw, type=keyword}, email={normalizer=raw, type=keyword}, url={index=false, type=text}, username={normalizer=raw, type=keyword}}}, scope={normalizer=raw, type=keyword}, name={type=text, fields={standard={analyzer=standard, type=text}, autocomplete={search_analyzer=package, analyzer=package_autocomplete, type=text}, english={analyzer=package_english, type=text}, raw={normalizer=raw, type=keyword}, english_aggressive={analyzer=package_english_aggressive, type=text}, autocomplete_highlight={search_analyzer=package, analyzer=package_autocomplete_highlight, type=text, index_options=offsets}, autocomplete_keyword={search_analyzer=package_autocomplete_keyword_search, analyzer=package_autocomplete_keyword, type=text}, edge_ngram={search_analyzer=package, analyzer=package_edge_ngram, type=text}}}, description={type=text, fields={standard={analyzer=standard, type=text}, english={analyzer=package_english, type=text}, english_aggressive={analyzer=package_english_aggressive, type=text}, edge_ngram={search_analyzer=package, analyzer=package_edge_ngram, type=text}}}, publisher={type=object, properties={email={index=false, type=text}, username={index=false, type=text}}}, links={type=object, properties={bugs={index=false, type=text}, npm={index=false, type=text}, repository={index=false, type=text}, homepage={index=false, type=text}}}, version={index=false, type=text}}}, flags={type=object, properties={unstable={type=boolean}, deprecated={type=text, index_options=docs}, insecure={type=integer}}}}}]\",\"caused_by\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"Root mapping definition has unsupported parameters: [score : {dynamic=false, _all={enabled=false}, properties={evaluation={type=object, properties={popularity={type=object, properties={downloadsCount={index=false, type=double}, dependentsCount={index=false, type=double}, communityInterest={index=false, type=double}, downloadsAcceleration={index=false, type=double}}}, maintenance={type=object, properties={releasesFrequency={index=false, type=double}, commitsFrequency={index=false, type=double}, issuesDistribution={index=false, type=double}, openIssues={index=false, type=double}}}, quality={type=object, properties={tests={index=false, type=double}, branding={index=false, type=double}, health={index=false, type=double}, carefulness={index=false, type=double}}}}}, score={type=object, properties={final={type=double}, detail={type=object, properties={popularity={type=double}, maintenance={type=double}, quality={type=double}}}}}, package={type=object, properties={date={index=false, type=date}, maintainers={type=object, properties={email={normalizer=raw, type=keyword}, username={normalizer=raw, type=keyword}}}, keywords={type=text, fields={standard={analyzer=standard, type=text}, english={analyzer=package_english, type=text}, raw={analyzer=raw, type=text}, english_aggressive={analyzer=package_english_aggressive, type=text}, edge_ngram={search_analyzer=package, analyzer=package_edge_ngram, type=text}}}, author={type=object, properties={name={normalizer=raw, type=keyword}, email={normalizer=raw, type=keyword}, url={index=false, type=text}, username={normalizer=raw, type=keyword}}}, scope={normalizer=raw, type=keyword}, name={type=text, fields={standard={analyzer=standard, type=text}, autocomplete={search_analyzer=package, analyzer=package_autocomplete, type=text}, english={analyzer=package_english, type=text}, raw={normalizer=raw, type=keyword}, english_aggressive={analyzer=package_english_aggressive, type=text}, autocomplete_highlight={search_analyzer=package, analyzer=package_autocomplete_highlight, type=text, index_options=offsets}, autocomplete_keyword={search_analyzer=package_autocomplete_keyword_search, analyzer=package_autocomplete_keyword, type=text}, edge_ngram={search_analyzer=package, analyzer=package_edge_ngram, type=text}}}, description={type=text, fields={standard={analyzer=standard, type=text}, english={analyzer=package_english, type=text}, english_aggressive={analyzer=package_english_aggressive, type=text}, edge_ngram={search_analyzer=package, analyzer=package_edge_ngram, type=text}}}, publisher={type=object, properties={email={index=false, type=text}, username={index=false, type=text}}}, links={type=object, properties={bugs={index=false, type=text}, npm={index=false, type=text}, repository={index=false, type=text}, homepage={index=false, type=text}}}, version={index=false, type=text}}}, flags={type=object, properties={unstable={type=boolean}, deprecated={type=text, index_options=docs}, insecure={type=integer}}}}}]\"}},\"status\":400}"},"msg":"Scoring cycle failed","v":1}

it shows failed.

Since couchDB alwasys down during my test. I think it must be something wrong with my couchDb, so I can not get my score.