Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×

[Script] JournalSearch - an advanced journal search engine

1774136291

Edited 1774209094
JournalSearch is an advanced search engine for your Roll20 campaign. It crawls all Handouts and Characters (including GM Notes) to provide a ranked list of results directly in a dedicated "Journal Search Results" handout. Code Key Features Ranked Relevance: Results are prioritized by where the term is found: Title matches first, followed by Header matches , and finally Body text matches . Phrase Support: Searching for "Ring of Warmth" finds the exact phrase, not just the word "ring." Contextual Snippets: Shows the search term with 3 words of context before and after. Deep-Linking: Each result includes a "Jump to Section" link that attempts to open the handout directly to the specific header where the match was found. Auto-Indexing: The script automatically re-indexes your journal whenever the sandbox restarts or a handout is edited. How to Use Search: Type !jsearch [your phrase] in the chat. Re-Index: Type !jindex to manually force a full crawl of your journal. Recommended Macro: Create a macro named "Search" with the following action to get a popup search box: !jsearch ?{Search Term?} The "Double-Click" Quirk Due to how Roll20 handles asset loading, clicking a "Jump to Section" link sometimes only opens the handout to the top on the first try. If this happens, simply click the link a second time, and it will correctly scroll to the specific header/anchor. Link to Code
1774138264
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I'll have to try this out. I had been using the Aaron's Search script, but my campaign got so large, the script would time out building the index.
1774138447
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Wow. Super quick!
this is a must have script! awesome work and thank you.
This is going to be SO useful! Thank you!
1774207879
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I had to uninstall it. My Director script writes its data to State (1,100KB), and combined with the JSSeach state object (800KB), and the numerous, more reasonable state objects, it threw me over the 2MB limit. I need to rewrite Director's data storage method to a handout. It's a state hog.
1774207960
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I might try to tie this in to the project I'm working on next. It would provide a ton of functionality.
So glad you all find it so useful!
Made an update to how the index is stored. Moved it from state to the sandbox memory. If you have install the previous version installing the new version ought delete the old state file to free up the memory.
1774302945
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Works like a charm, and prompted me to do similar with another project.