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

[Document] Need a detailed description about some methods #267

Open
Losses opened this issue Sep 5, 2021 · 1 comment
Open

[Document] Need a detailed description about some methods #267

Losses opened this issue Sep 5, 2021 · 1 comment
Assignees
Labels
documentation Documentation request

Comments

@Losses
Copy link

Losses commented Sep 5, 2021

Hi, I'm the author of #266 ,

  1. On the language options section, both stemmer, filter, matcher said we could pass a Function into it, but what does it looks like? Since I haven't used this feature, I was confused about how to write type annotation for it.

  2. The document said that stemmer could be a custom object, filter and matcher could be a custom array, but this is not consistent with previous type definition,

flexsearch/index.d.ts

Lines 120 to 122 in 5dfb3de

type Stemmer = { [key: string]: string };
type Matcher = { [key: string]: string };
type FilterFn = (str: string) => boolean;

and even not consistent with the following document:

matcher, type: {string: string}
stemmer, type: {string: string}
filter, type: string[]

are they changed on 0.7.0?

  1. The second parameter of registerCharset and registerLanguage is not clear enough, they are Charset Options, Language Options or something else?

I've noticed that there are something called 'tokenize' from:

this.tokenize = tmp = (charset && charset.tokenize) || options["tokenize"] || "strict";

but this is not showed up on the Charset Options section, this confused me a lot.

Thanks for your time!

@mmm8955405
Copy link

I think the documentation should be updated. Otherwise, I don't know how to use this. I look confused

@ts-thomas ts-thomas self-assigned this Oct 2, 2022
@ts-thomas ts-thomas added the documentation Documentation request label Oct 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation request
Projects
None yet
Development

No branches or pull requests

3 participants