Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The filter option seems not working #397

Open
ahmad-moussawi opened this issue Jul 12, 2023 · 0 comments
Open

The filter option seems not working #397

ahmad-moussawi opened this issue Jul 12, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ahmad-moussawi
Copy link

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?

@ts-thomas ts-thomas self-assigned this Jan 6, 2024
@ts-thomas ts-thomas added the bug Something isn't working label Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants