Skip to content

Latest commit

 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kth-search-push-util

Utils to simplifie pushing information to KTH:s search solution

Examples

const log = require('kth-node-log')
const { SearchPush } = require('@kth/kth-node-search-push-util')

const config = {
  log: log,
  client: api.client,
  paths: api.paths,
  batchSize: 10
}

const util = new SearchPush(config)

const import = async (pages) => {
  for (let page of pages) {
    await util.pushPage(page)
  }

  await util.flush()

  await cleanup()
}

const cleanup = () => {
  return util.deletePages('type', new Date())
}

About

Utils to simplifie pushing information to KTH:s search solution

Resources

Stars

0 stars

Watchers

13 watching

Forks

Releases

Packages

Used by

Contributors

Languages