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

First steps for search box #20

Conversation

jeroenvandijk
Copy link
Contributor

@jeroenvandijk jeroenvandijk commented May 5, 2020

A first version of a search box.

TODO

  • Add click handler to search results
  • Filtering of results need to be tweaked
  • Sorting of results need to be tweaked
  • Uses db global, should be use passed argument
  • Styling of output

Screenshot

Athens_Research

@jeroenvandijk
Copy link
Contributor Author

With highlighting

Athens_Research

@jeroenvandijk jeroenvandijk mentioned this pull request May 5, 2020
@jeroenvandijk
Copy link
Contributor Author

For later, consider full text search, maybe https://github.com/theronic/datascript-fulltext/

Especially the first hit is a bit slow. I can imagine this gets worse when the db grows. Might need some fulltext search indexing at some point. A first optimization would be to just limit the text to a minimum of characters, but Roam doesn't do this either.

Needs some proper design :)
@jelmerderonde
Copy link
Contributor

jelmerderonde commented May 16, 2020

@jeroenvandijk maybe something like https://github.com/nextapps-de/flexsearch or http://elasticlunr.com/ can be integrated quite easily? It isn't ClojureScript but it doesn't look that hard to write a simple wrapper / use it directly using interop.

@jeroenvandijk
Copy link
Contributor Author

Thanks for the suggestion @jelmerderonde! I think we could combine that library with the work that was done in datascript fulltext approach mentioned before

I think for now the current search is good enough. We have to focus on the presentation of the results. With the current amount of data in the database we wouldn't really have a proper test case either. But I'm sure your suggestion will be of help in the next phase when we can import full databases and can write new data into Athens

@tangjeff0 tangjeff0 added this to In progress in A Self-Hosted Athens May 24, 2020
@tangjeff0 tangjeff0 changed the title First steps for search box Search May 27, 2020
@tangjeff0 tangjeff0 moved this from Discovery to To do in A Self-Hosted Athens May 27, 2020
@tangjeff0 tangjeff0 linked an issue May 27, 2020 that may be closed by this pull request
@tangjeff0 tangjeff0 removed this from To do in A Self-Hosted Athens May 27, 2020
@tangjeff0 tangjeff0 changed the title Search First steps for search box May 28, 2020
@tangjeff0 tangjeff0 mentioned this pull request Jun 4, 2020
11 tasks
@tangjeff0
Copy link
Collaborator

tangjeff0 commented Jun 8, 2020

Used much of the search logic in #128, main feature issue now #126

@tangjeff0 tangjeff0 closed this Jun 8, 2020
@jelmerderonde
Copy link
Contributor

Just came across this article: https://www.notion.so/Product-Search-in-Clojure-DataScript-3d467efc55244f3693127f8d9da5f262

Interesting stuff we might want to use if we ever revisit this issue.

@tangjeff0
Copy link
Collaborator

tangjeff0 commented Jul 7, 2020

@jelmerderonde incredible find. Loved how he did fuzzy search, tokenization, and direct index access. All his projects and writing are excellent as well.

@tangjeff0 tangjeff0 mentioned this pull request May 1, 2021
2 tasks
neotyk added a commit that referenced this pull request Feb 15, 2022
Indent, Enter and backspace monitoring
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.

Search
3 participants