Searching by knitspeak snippets
Posted 30 Apr 2020 by JC
Now this is a fun one! Today’s new feature is the ability search by little snippets of knitspeak, like “k1 tbl” or “[yo, k1] 5 times.”
Give it a try: go to the Browse page, or to the detail page for any collection, and find the “Knitspeak snippets” section in the “Search options” box.
Enter any bit of knitspeak, and you’ll see all the stitch patterns whose written instructions include that bit of knitspeak.
Along with those search results, you’ll also see another empty input box. Enter another snippet into that box, and you’ll see all patterns that contain both snippets – for example, both “k1 tbl” and “RT.”
What if you want to find all the patterns whose written instructions contain either “w&t” or “turn”? Easy: in a single box, enter “w&t | turn.” The vertical bar (found on most keyboards above the “\” character) means “or,” and you can have as many of them as you like in one input box.
This allows all sorts of trickery – for example, all patterns that make use of twisted stitches and short rows:
But wait, there’s more! Start a snippet with “^” (the character above “6” on most keyboards) and that snippet will be excluded from the search results. So this will search for patterns that are not worked in the round:
This will search for patterns that feature yarn overs, but not the most common single decreases:
Of course you can combine any of these “Knitspeak snippets” search options with other search options. Here’s a way to find patterns that use “brSl” symbols but haven’t been tagged as “brioche”:
Or patterns named “Feather and fan” that don’t have yarn overs:
NoteAll the comparisons are case-insensitive, so “sl1” will match “sl1” or “Sl1.” But other than being case-insensitive, the comparisons are very literal.
- “Row 1” (without an “s”) will not match “Rows 1 and 2.”
- “k2 , p1” (with an extra space before the comma) will not match “k2, p1.”
- “LT” will match “1/1 LT” and “multiple of 5 sts” (because of the “lt” in “multiple”).
Why are the comparisons so literal? Because they’re done on the actual knitspeak for each stitch pattern, exactly as it’s shown on the pattern’s detail page and – more to the point – as it’s stored in the site’s database. Doing comparisons on the knitspeak stored in the database is what makes the searches so fast and so powerful.