Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@warp-works/warpjs-elasticsearch-plugin

Package Overview
Dependencies
Maintainers
4
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@warp-works/warpjs-elasticsearch-plugin

Elasticsearch plugin for WarpJS

  • 2.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

WarpJS ElasticSearch plugin

ElasticSearch implementation for the search plugin for WarpJS.

Configuration

Add the following configuration to the plugins list:

{
  "name": "ElasticSearch plugin",
  "moduleName": "@warp-works/warpjs-elasticsearch-plugin",
  "path": "/search",
  "type": "search",
  "config": {
    "host": "http://localhost:9200",
    "indexName": "warpjs",
    "pageSize": 10
  }
}

API

plugin(config, warpCore, Persistence)

Prepare the plugin to be used.

plugin.getDocument(config, type, id)

Retrieve the document.

plugin.indexDocument(config, persistence, entity, instance)

Add the given instance to the index.

plugin.indexDomain(config, warpCore)

Index the entire domain.

plugin.initializeIndex(config)

Create the index and mapping. The index name is config.indexName and the type is config.domainName. The current mapping can be found in mapping.js.

plugin.entity.generateId(instance)

Generate an ID for the indexing service. This will generate an ID from ${instance.type}:${instance.id}.

plugin.entity.payload(persistence, entity, instance)

This function generate the payload to be used to add to the indexing service.

plugin.getUrl()

Returns the URL where to make GET / POST calls.

Keywords

FAQs

Package last updated on 15 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc