RSS

Behind-The-Scenes of a Board Games Website

We’re journaling the development of FastMovingGames, our new online service for board gamers - read on for previews, tech insights, and news of the launch!

Board Games Search

Game SearchThis week I’ve been working on getting the board games search module functioning using the nifty tricks I talked about last time.

This post gives you a sneak preview of the work in progress of the games search module and shows you how it works using a few examples.

Bear in mind that the design of the final search page may change, so for now I’m only concentrating on getting functionality working and the right information displayed on screen (hence the meaningless blurb on the following screenshots!)

Searching For Board Games

Here’s a screenshot of the search page searching for the board game Carcassonne.

Carcassonne Board Game Search

For the main search results I’ve used a ‘natural language’ type of search which finds other relevant board games with the same keywords in their names. This works really well as you can tell, since a useful search for the board game Carcassonne, should return results for similar named variants such as Carcassonne the Castle, Carcassonne the City, an others as shown.

Sounds-Like Board Games To Me

You can also see the ’sounds-like’ search in practical usage from the screenshot above - the ‘also found similar matches’ part is actually doing the SoundEx match under the covers, thus we also return similar sounding board games such as Crazy Chicken and Crisis Sinai 1973…!

This is demonstrated probably more effectively by the following screenshot - searching for the fantastic card game Tichu (which I love - check out our growing Local Tichu league!).

Tichu Card Game - Search

As desired, it finds the natural language match for the card game Tichu, but check out the sounds-like results - 42 (sounds-like Tichu? yup!), 7th Sea (yeh!), Titus (yes), Touch (yeh), Chinese Checkers (hmm…I guess if you say it fast enough it is similar sounding!). All great stuff, showing that the sounds-like search is working really well.

So as well as picking up games that sounds the same, one of the more useful uses of the sounds-like search is for mistyped or misspelled board game names. Check out the search results when I enter the intentionally misspelled “carcason”…

Carcassonne Board Game - Misspelled Search

So great - still found the correctly-spelled “Carcassonne” in the results list as desired.

Alternative Game Names

Unfortunately, some games have different game names in different countries or may just be known as something else - what if you only know your native language version of the game? How does the games search cope with this? Lets see…

Boo Who Game - Search

Here I was trying to generate a search that returned no results so typed in the random search phrase, ‘Bob’. So what went wrong? - similar match to Bob is Geistertreppe?? A quick check on Board Game Geek and we find out Geistertreppe is also known as Boo Who! Bob and Boo? Sounds like it!

Great - the boardgames search not only returns results that sounds the same, it will also check alternate names for a particular game and see if the search phrase sounds like that too - woohoo! … (Okay actually this isn’t just pure luck - it’s all as designed :)

Slight Limitation of the Games Search

Whilst the natural search results are great at finding other and variant matches as per Carcassone above, it does have the unfortunate limitation in that if the search string is too short, it often doesn’t match results even if they are there (the search considers it a ’stop-word’ like a, and, or the and disregards it from the search). Take the game Taj Mahal for instance, often referred to by our games group as simply Taj:

Games Search - Taj

Our board game Taj Mahal doesn’t show up in either search results - not ideal. What about searching for just Mahal?

Games Search - Mahal

We found the boardgame this time!

There’s not an easy way around this ‘feature’ using the underlying search index that I’ve used. This isn’t an obviously big problem though - the utility of the natural language search to find other related game names is a more useful trade off in my opinion. If searchers can’t find the game by using a shortened version like Taj then hopefully, you’ll still be able to find it using a longer version or sounds-like result.

Next On the Development List

So this brings the games module up to about 25% complete (first pass). I still need to construct the ability for users to submit new games that aren’t on the list, and to provide a similar browse games list feature for those that want to see what’s on the site instead of searching.

Finally, a page to view the searched-for game and related information will then start leading me into developing the core engine, an area which I’ve been seriously thinking about over the last week trying to figure out how the data is going to be stored and updated - it’s all very complex!

Stay tuned for more.

Cheers,

-Dan

Comments (4)

  1. AJ

    Maybe you could throw in a simple “contains” search for luck. The natural language search is great as you say, but what if the site in the case of a zero-result natural language search does a super simple “games.name LIKE ‘%$search_string%’” type WHERE clause, as well as the SOUNDS LIKE that you are using for the similar results. Just tested it on my server and it is happy to look for little words, even “the” is acceptable.

  2. AJ

    PS: The first time I submitted that comment, I got an error from the Wordpress system saying “please enable javascript and cookies on your browser”, I clicked back, and then submit again and it worked… weird.

  3. Dan

    Good call - I thought about using a simple wildcard search failing anything else, although this isn’t great with large number of records and on a performant web database - still, could use gamename% without first wildcard to at least force using an index.

  4. Dan

    I’ve had to implement some anti-spam measures on the blog due to the amount of automated spam that I get through the comments. This JS/Cookie thing is a side-effect of that, but glad to see your post still came through though.

Add Your Comment