feat: search + basic engine (wip)
This commit is contained in:
30
server/modules/search/postgres/definition.yml
Normal file
30
server/modules/search/postgres/definition.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
key: postgres
|
||||
title: Database - PostgreSQL
|
||||
description: Advanced PostgreSQL-based search engine.
|
||||
author: requarks.io
|
||||
logo: https://static.requarks.io/logo/postgresql.svg
|
||||
website: https://www.requarks.io/
|
||||
props:
|
||||
dictLanguage:
|
||||
type: String
|
||||
title: Dictionnary Language
|
||||
hint: Language to use when creating and querying text search vectors.
|
||||
default: english
|
||||
enum:
|
||||
- simple
|
||||
- danish
|
||||
- dutch
|
||||
- english
|
||||
- finnish
|
||||
- french
|
||||
- german
|
||||
- hungarian
|
||||
- italian
|
||||
- norwegian
|
||||
- portuguese
|
||||
- romanian
|
||||
- russian
|
||||
- spanish
|
||||
- swedish
|
||||
- turkish
|
||||
order: 1
|
72
server/modules/search/postgres/engine.js
Normal file
72
server/modules/search/postgres/engine.js
Normal file
@@ -0,0 +1,72 @@
|
||||
const _ = require('lodash')
|
||||
|
||||
module.exports = {
|
||||
activate() {
|
||||
// not used
|
||||
},
|
||||
deactivate() {
|
||||
// not used
|
||||
},
|
||||
/**
|
||||
* INIT
|
||||
*/
|
||||
init() {
|
||||
// not used
|
||||
},
|
||||
/**
|
||||
* SUGGEST
|
||||
*
|
||||
* @param {String} q Query
|
||||
* @param {Object} opts Additional options
|
||||
*/
|
||||
async suggest(q, opts) {
|
||||
|
||||
},
|
||||
/**
|
||||
* QUERY
|
||||
*
|
||||
* @param {String} q Query
|
||||
* @param {Object} opts Additional options
|
||||
*/
|
||||
async query(q, opts) {
|
||||
|
||||
},
|
||||
/**
|
||||
* CREATE
|
||||
*
|
||||
* @param {Object} page Page to create
|
||||
*/
|
||||
async created(page) {
|
||||
// not used
|
||||
},
|
||||
/**
|
||||
* UPDATE
|
||||
*
|
||||
* @param {Object} page Page to update
|
||||
*/
|
||||
async updated(page) {
|
||||
// not used
|
||||
},
|
||||
/**
|
||||
* DELETE
|
||||
*
|
||||
* @param {Object} page Page to delete
|
||||
*/
|
||||
async deleted(page) {
|
||||
// not used
|
||||
},
|
||||
/**
|
||||
* RENAME
|
||||
*
|
||||
* @param {Object} page Page to rename
|
||||
*/
|
||||
async renamed(page) {
|
||||
// not used
|
||||
},
|
||||
/**
|
||||
* REBUILD INDEX
|
||||
*/
|
||||
async rebuild() {
|
||||
// not used
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user