This commit is contained in:
parent
307898c56b
commit
54dc49d055
@ -3,8 +3,8 @@ const nodeinfo = require('activitypub-express/pub/nodeinfo')
|
||||
module.exports = (app, client) => {
|
||||
const constant = require('./constant'),
|
||||
zlib = require('zlib'),
|
||||
StreamArray = require('stream-json/streamers/StreamArray'),
|
||||
{ parser } = require('stream-json'),
|
||||
Pick = require('stream-json/filters/Pick'),
|
||||
{ streamArray } = require('stream-json/streamers/StreamArray'),
|
||||
{ chain } = require('stream-chain'),
|
||||
clean = str => {
|
||||
return str.replace(/[/\\^$+?()`'¡¿¨!"·%&=;,\|\[\]{}]+/gmi, '')
|
||||
@ -513,9 +513,8 @@ module.exports = (app, client) => {
|
||||
}
|
||||
}, { asStream: true, meta: false }),
|
||||
pipeline = chain([
|
||||
parser(),
|
||||
data => data.value.hits.hits,
|
||||
StreamArray.withParser(),
|
||||
Pick.withParser({ filter: 'hits.hits' }),
|
||||
streamArray(),
|
||||
data => data.value._source,
|
||||
zlib.createGzip()
|
||||
])
|
||||
|
Loading…
Reference in New Issue
Block a user