This week we have completed the first version of a feature that was been much requested and in our opinion needed: campaign search.
Before, search was only available for pages that represented a Person, Location or Faction by means of the relevant index, but the new generic search bar that has been added in the top left corner in the breadcrumbs bar will allow you to search all documents in the Setting, Rules and Notes wikis, as well as all forum threads.
We should note that the search feature is still somewhat limited. For the moment, it only considers the names of the document (including aliases) — this means the content of a thread or wiki page are not searched, just the titles. We want to expand search beyond that in the near future, but felt that this feature would offer enough benefit to add it now and expand upon it later.
Small Data Search
Most search providers nowadays specialize in what they call “big data”. Not only is that an active area of research, but it has also become a bit of an ICT buzzword along the lines of ‘cloud’ and ‘block-chain’. RPGpad is the opposite: we specialize in “small data” as even the biggest campaign settings are much smaller than the internet.
The (relatively) small size of the data offered us a unique opportunity to speed up the search function, by allowing it to be handled entirely client-side. This eliminates the usual round-trip to the server, allowing search results to be shown in real time, as you type, even if your internet is slow.
To enable this, a pre-generated dataset is sent to the browser the first time you visit a campaign, which the browser uses to provide you with search results. That dataset is refreshed when changes are made to the campaign, and because of our “small data” situation, the transfer of the pre-generated dataset takes only a second or two. To make sure it nevertheless does not hinder your normal usage of the site, the data transfer is handled in the background, after your page finished loading — out of sight, out of mind.
So why is there ‘Edna’ in my ‘po’?
One question that may arise when viewing the image before is “Why would ‘Edna’ be listed as a result for a search for ‘po’?”. Clearly “POsition”, “POtence” and “POwer plant club” belong there, but what about “The Habadasher” and “Edna”?
The reason is simple: search also checks the aliases for each page. Mrs. Peaton’s full name is “POlly Peaton”, which is a listed alias, and “The Habadasher“‘s real name is Fred POtter. Edna is “Edna POrter”.
While this may seem a bit unusual when searching for a term using only two letters like “po”, we believe this will help you find pages hidden under an alias much more easily - like when you list an NPC under their proper name while using their nickname or vice versa.
Keep an eye out though as we will be expanding and improving upon the search function in the coming months and we especially hope to use your feedback to do so. Why not tell us what you think of the new search function, or check out what other progress we made this week by visiting this weeks Changelog?