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

Update documentation on intraRules, search example #54

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ascendedguard
Copy link

Updated the docs on the few things I struggled a bit with:

  • Search was missing an example, beyond the time figuring it out, I ended up having to step through the code in-depth to understand why the order was null when using outOfOrder
  • intraRules wasn't documented, so I added it based on Single Error mode only allowing exact matches under 5 characters #53
  • The section on intraSub, intraTrn, and intraDel, I kept finding myself having to re-search through the docs to remember what they meant, as it only said in the intraMode: 1 section.

For the search example, I didn't include it in the doc but I did test it out via Codepen: https://codepen.io/ascendedguard/pen/PoLZdBJ

Comment on lines +206 to +207
// Order may be null when doing out of order searching
// when the # of search terms exceed the max allowed
Copy link
Owner

@leeoniya leeoniya Jan 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, any of them can be null.

iirc 🤣 ...

  • idxs can be null if the search string ends up empty after trimming whitespace and removing non-alphanumeric chars (except those in quotes, for exact matches)
  • info will be null if the number of results exceeds infoThresh

Copy link
Owner

@leeoniya leeoniya Jan 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and they're null in sequence.

if order is not null, then idxs and info is not null.
if info is not null then idxs is not null
if idxs is null, everything is null

@leeoniya
Copy link
Owner

leeoniya commented Jan 4, 2024

thanks!

i actually want to encourage people to use the integrated search, so feel like it should be listed first, but struggle with how to explain the concepts of idxs, info, order. 🤔

@ascendedguard
Copy link
Author

Added some more detail to explain it some more, let me know what you think.

Forgot to mention it originally, but I left the variable declarations as let to match the rest of your docs, although they could have all been const instead. They're const in the Codepen.

@ascendedguard
Copy link
Author

Anything you need to be able to close this out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants