nextapps-de / flexsearch

Next-Generation full text search library for Browser and Node.js
Apache License 2.0
12.54k stars 492 forks source link

The `filter` option seems not working #397

Open ahmad-moussawi opened 1 year ago

ahmad-moussawi commented 1 year ago

I have the following code

const index = new FlexSearch.Index({
  tokenize: "forward",
  filter: (value) => {
    console.log({ value });
    return value.length > 1 && ["al", "el"].includes(value);
  },
});

I can't see any log either when adding a new record to the index, or when searching.

index.add(1, 'Hello ABC');
index.search('Hello');

Nothing printed out.

I am missing something here?