Forum Discussion
Keyword based search
I am trying to build a project that showcases the work of a visual artist. I want the user to be able to enter a search term and then click through all the relevant works based on the search term, skipping the rest.
My approach has been to put each work on a slide, and in each Timeline Starts trigger set a SearchTerms variable to a list of terms (separated by spaces) that apply to that work. On the home page, the user would enter a search term, and then the thing would go through each screen in succession, using a little JS script to check the entered search term against the list of terms assigned in that screen's timeline starts event. If the word is found, the slide is displayed. If not, it jumps to the next slide where the process repeats. I placed the image at 1/8 second, so it will not display if the slide doesn't match. (This prevents every slide from displaying very briefly while the script is being run and the variables evaluated.)
However, while this worked well in my test, it does not work in real life. Because there are so many images to catalog (over 100), the wait time is just too long as it jumps from slide to slide. On top of that, the execution time on each slide is inconsistent, so some of the incorrect images do display briefly. It's not going to work.
So I need some new idea. Again, the vision here is to have a home page with a search input box where the user can enter some search term. They are then presented somehow with all the slides (art works) that match the search term, and the rest are skipped.
Another wrinkle is that I was trying to do this with all the images stored locally and published with the course, but the compile time and subsequent published folder was going to be too big, so instead I am storing the images in AWS and just using URLs to access them. Don't know if that makes any difference, but I will have a hard-coded URL for each image.
IDEAS!?
- ChristyTuckerCommunity Member
I know this is an Articulate forum, but does the solution have to be built in Storyline? It seems like this project would be much better served by using web tools. A searchable gallery would be trivial to build in WordPress, for example. Even something like a Glide app seems like it would be worth exploring.
Before you selected Storyline as the tool to create this, did you consider any other options? It might be worth backing up in the process to think about the best tool for the job. Any responsive web-based tool for managing media seems like it would be more viable than Storyline's slide-based model.
- JimOwen-f418d1fCommunity Member
Thanks Christy, you're right, I had Storyline on the brain. That's a good thing to think about. The reason I wanted to use SL was two things 1) it's what I'm using all day already anyway, and 2) I can easily publish to web then store the whole enchilada on AWS and simply give the user a link.
But your reminder is a good one, and I should think about that. Thank you for that.
- MathNotermans-9Community Member
Best approach for sure.
- MathNotermans-9Community Member
2 possible approaches that could help fix your issues.
- Using dynamic images. Thus you search in an array...and only show those found. Not jumping to slides, but showing the found images on the page after the search has completed.
- Using fuzzy search. I do have some samples for fuzzy searching in Storyline. So you can misspel and still get response that fall within a specified range. Displaying the images might be with dynamic images too. - MathNotermans-9Community Member
As i mentioned, i have a working fuzzy search sample here.
https://community.articulate.com/discussions/articulate-storyline/using-like-fuzzy-logic-to-set-a-range-of-acceptable-answers-for-required-text-entry - MathNotermans-9Community Member
And here you can find how to use dynamic images in Storyline.
https://community.articulate.com/discussions/articulate-storyline/how-to-create-dynamic-texts-links-and-dynamic-images-in-storyline
This code does the trick.var newSrc = result[0].url;
gsap.to($("[data-model-id='5q7M1XX9AaZ'] > div > iframe"),{attr:{src:newSrc}});
And some more explanation here:
https://community.articulate.com/discussions/building-better-courses/qr-code-and-shorturl-generation-in-storyline
https://www.linkedin.com/feed/update/urn:li:ugcPost:7010644737237909504/ - AlexMilyaev-f86Community Member
Here is where I posted an example of searching by course in Storyline https://community.articulate.com/discussions/building-better-courses/text-search-in-articulate-storyline-course
If I understood your task correctly, this approach might be helpful for you.
- JimOwen-f418d1fCommunity Member
Oh that's great! And yes, that's pretty much exactly what I am trying to do. I'll look at your solution shortly. I've got some optimism...