SearchDB(opts)

Search database.

Constructor

new SearchDB(opts)

Parameters:
Name Type Description
opts object
Properties
Name Type Description
pk string

Primary key

search object

Fuse.js options

Author:
Satoshi Soma (amekusa.com)
License:
Apache-2.0
Copyright 2020 Satoshi Soma

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Source:
lib/SearchDB.js, line 23
See:
https://www.fusejs.io/api/options.html

Methods

feed(record, link)

Feeds a new record.

Parameters:
Name Type Description
record object
link object
Properties
Name Type Description
url string
label string
Source:
lib/SearchDB.js, line 44

has(record)boolean

Checks if the given record already exists.

Parameters:
Name Type Description
record object
Source:
lib/SearchDB.js, line 57
Returns:
Type:
boolean

serialize()object

Serializes all the records into JSON format.

Source:
lib/SearchDB.js, line 69
Returns:
Type:
object

Licensed under the Apache License 2.0

Documentation generated by JSDoc 4.0.2 using Docolatte theme