2.0.18 • Published 9 months ago

loopback-full-text-search-mysql v2.0.18

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

loopback-full-text-search

Add Full-text search when using the q parameter in the where clause for Loopback 3.

Installation

npm install --save loopback-full-text-search

Usage

Modify your server/component-config.json to include this module and configure the models and fields you want to include in the Full-text search:

"loopback-full-text-search": {
  "models": [
    {
      "name": "book",
      "fields": ["name", "description"]
    },
    {
      "name": "user",
      "fields": ["name"]
    }
  ]
}

And make the Full-text search using the q parameter in the where clause:

{ 
  "where": {
    "q": "loopback" 
  }
}

react-admin

You can use loopback-full-text-search with react-admin.

// in src/books.js
const BookFilter = (props) => (
  <Filter {...props}>
    <TextInput label="Search" source="q" alwaysOn />
  </Filter>
);

export const BookList = (props) => (
  <List {...props} filters={<BookFilter />} >
    ...
  </List>
);

Don't forget to check loopback-content-range and react-admin-loopback.

License

This library is licensed under the MIT Licence.

2.0.18

9 months ago

2.0.17

9 months ago

2.0.16

9 months ago

2.0.15

9 months ago

2.0.14

9 months ago

2.0.13

9 months ago

2.0.12

9 months ago

2.0.11

9 months ago

2.0.10

9 months ago

2.0.9

9 months ago

2.0.8

9 months ago

2.0.7

9 months ago

2.0.6

9 months ago

2.0.5

9 months ago

2.0.4

9 months ago

2.0.3

9 months ago

2.0.2

9 months ago

2.0.1

9 months ago

2.0.0

9 months ago

1.0.0

9 months ago