DPDK Architecture  ->  Bootstrap (v3.0.5)

Search
>= v1.20.2

Simple search middleware for Express

Features

  • Provides a mongo text search based on text search indexes: https://docs.mongodb.com/manual/core/index-text/
  • Opens a form endpoint at /api/search (POST) and expects a body.
  • Includes the default function with configuration from the application config

Bootstrap

Config

No config implemented

Implementation

const search = require('./middleware/search');

this.server.use(search(this, this.config.search));

Usage

Config

{
  "search": {
    "enabled": false,
    "collections": [],
    "conditions": {}
  }
}

Example request body

{
  "term": "A search term",
  "collections": [],
  "conditions": {}
}

Collections and conditions are optional

Links

No links available

Last modifiedFriday, April 30, 2021, 12:00:21 PM UTC
Last authorColin van Eenige
Commit ID4c7a701