Hi
Thanks for the plugin ZQ Fuzzy Search.
However, I would advise a little update
Currently, the tokenize options is not working. In fact tokenize in not supported by Fuse.js anymore
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [6.5.3](https://github.com/krisk/Fuse/compare/v6.5.2...v6.5.3) (2021-12-23)
### Bug Fixes
* **logical:** scoring for logical OR ([6f6af51](https://github.com/krisk/Fuse/commit/6f6af51cc39058fafea6b126f7120afc4f7c192a)), closes [#593](https://github.com/krisk/Fuse/issues/593)
### [6.5.2](https://github.com/krisk/Fuse/compare/v6.5.1...v6.5.2) (2021-12-23)
### [6.5.1](https://github.com/krisk/Fuse/compare/v6.5.0...v6.5.1) (2021-12-23)
### Bug Fixes
* rollback min node version ([9918f67](https://github.com/krisk/Fuse/commit/9918f67ba9b6b9b54e53576312fa33a51f428a9d))
This file has been truncated. show original
Could you update the plugin and implement the extended searching option?
opened 12:13AM - 10 Mar 20 UTC
closed 02:54AM - 16 Mar 20 UTC
discussion
I recently added [extended search](https://github.com/krisk/Fuse/tree/extended-s… earch/src/extended-search) (inspired by [fzf](https://github.com/junegunn/fzf/blob/master/README.md#search-syntax)). I'd love our thoughts 🙏
### Why?
This form of advanced searching allows the user to fine-tune their results. It can be used to immediately exclude a large part of their search body before doing the final fuzzy matching. It's reminiscent of Unix-like terminal commands.
### Search syntax
Fuse.js will work exactly as before, and if you give the option `useExtendedSearch:true`, you can use the following syntax in the search query:
| Token | Match type | Description |
| ----------- | -------------------------- | -------------------------------------- |
| `jscript` | fuzzy-match | Items that match `jscript` |
| `'python` | exact-match | Items that include `python` |
| `!ruby` | inverse-exact-match | Items that do not include `ruby` |
| `^java` | prefix-exact-match | Items that start with `java` |
| `!^earlang` | inverse-prefix-exact-match | Items that do not start with `earlang` |
| `.js$` | suffix-exact-match | Items that end with `.js` |
| `!.go$` | inverse-suffix-exact-match | Items that do not end with `.go` |
White space acts as an **AND** operator, while a single pipe (`|`) character acts as an **OR** operator.
For example, this search query:
```bash
"^core go$ | js$ | py$ xy$"
```
is interpreted as the following logical expression:
```bash
("^core" AND "go$") OR "js$" OR ("py$" AND "xy$")
```
### Usage
```js
const options = {
// Enable extended search
useExtendedSearch: true,
keys: [
/*...*/
],
}
const fuse = new Fuse(/*...*/)
fuse.search('^jscript .python$ | ruby | !java')
```
---
**Do we still need the previous implementation of tokenization (i.e, see #355)?** With extended search, we have more useful form of fuzzy tokenization, where you could provide a pipe-delimited search query:
```js
fuse.search("jcript | pthon | rby")
```
### Feedback? Questions?
Please have a go at it 😄
Thanks for your work
Valérian LEBERT