Search results now include things that would show up as labels on the map - usually the names of polities but a few things like J-4 and J-5 routes across rifts.
As always, feedback appreciated!
...
日本からの訪問者を歓迎
SFロールプレイング・ゲーム トラベラー
Ω
Showing posts with label searching. Show all posts
Showing posts with label searching. Show all posts
2015-10-18
2014-12-31
Search within a sector with in: prefix
Search now supports an in: prefix for limiting the search to a particular sector:
- t* in:"Solomani Rim" - find worlds starting with T in the Solomani Rim
- reg* in:spin - find worlds starting with REG in the Spinward Marches
- uwp:*-F in:Deneb - find Tech Level 15 worlds in Deneb sector
Use quotes for sector names with spaces, but the sector name match is a prefix match so an abbreviation (spin, solo, troj, etc) will work too.
Ω
2013-03-31
New T5 Data Drop
Another T5 Second Survey data drop from Don McKinney. This one rolls in updated data for Ziafrplians and Gvurrdon, and fixes a few glitches like extra TL-G worlds that sharp-eyed users have noticed.
I've also rewritten parts of the page that display dynamic data - search results and the credits/links at the bottom - as well as the booklet generator to use Handlebars.js. I had been using JsonT but wanted to move to a more modern template system. Handlebars is derived from Mustache but supports paths which I needed. This should not have changed anything except for a slight performance improvement, but as usual let me know if I broke something.
Ω
I've also rewritten parts of the page that display dynamic data - search results and the credits/links at the bottom - as well as the booklet generator to use Handlebars.js. I had been using JsonT but wanted to move to a more modern template system. Handlebars is derived from Mustache but supports paths which I needed. This should not have changed anything except for a slight performance improvement, but as usual let me know if I broke something.
Ω
2010-04-25
C#3.0 / .NET 3.5 and search tweak
I updated the server-side code to C# 3.0 and have it using the .NET 3.5 runtime now; this should result in precisely zero changes, but it's possible that I broke something. Let me know.
Ω
I also made two extremely minor search tweaks:
- ? and _ now work as wildcard characters, matching exactly one character. This in addition to * and % which match zero or more characters.
- Using uwp: prefix and wildcards are now mentioned in the "tool tip" when you hover over the search field. Previously these were mentioned only in the API docs.
2009-04-16
JSONP - It's what's for breakfast
Good news, everybody!
I've added JSONP support to the data APIs (the image APIs don't need it). JSONP allows web pages living on your sites to call APIs on the TravellerMap.com site without any server-side work - it's all in the JavaScript.
More details: JSONP in the TravellerMap.com API Documentation
Here's a short introduction to using JSONP from jQuery which is my favorite JavaScript framework. (You'll note that I don't use any frameworks on the TravellerMap.com site; I was loathe to touch them when I started, and the site was a grand experiment in building everything from scratch. But I digress...) Ω
I've added JSONP support to the data APIs (the image APIs don't need it). JSONP allows web pages living on your sites to call APIs on the TravellerMap.com site without any server-side work - it's all in the JavaScript.
More details: JSONP in the TravellerMap.com API Documentation
Here's a short introduction to using JSONP from jQuery which is my favorite JavaScript framework. (You'll note that I don't use any frameworks on the TravellerMap.com site; I was loathe to touch them when I started, and the site was a grand experiment in building everything from scratch. But I digress...) Ω
2009-02-20
More search tweaks
Okay, a few more tweaks:
- The handling of multi-word searches is now "Web-like". Multiple words in a search turn into multiple AND clauses. So "so ri" would find Solomani Rim sector.
- You can specify exact: as a prefix to force an exact name match of that term. So "exact:sol" will find only Sol subsector.
- You can specify uwp: as a prefix to match a UWP. (Searching only for XXXXXXX-X remains as a shortcut for a UWP search.)
- If you use wildcards, the "prefix search" functionality is turned off. That is, normally "reg" would match "Regina" and "Beta Regilis". "reg*" will only match names starting with "reg"
- t* uwp:*f - find worlds starting with T with Tech Level F
- exact:terra uwp:a* - find worlds named Terra with Class A starports
- Searches are performed on specific item data only, not the context of the item. By that I mean: you can't search on "solomani rim uwp:a*" since it would only search for worlds named "solomani" and "rim".
- Search results may include alternate languages or spellings that are known to the site metadata but aren't shown. For example, Solomani Rim is known as Kushuggi in Vilani, so "kush*" would find it, although it won't be apparent why.
2009-02-19
Search: Now with UWPs
Has this ever happened to you?
Damn... where did I leave that world?!?! I know it's UWP is A7899B9-B but I can't for the life of me remember where I left it! Well, I'm not sure... maybe it was B7899B9-C or A7899B9-C... ugh...If so, your days of trouble are over! You can now search for UWPs. Here's how it works:
- By default, search still only looks for names (sectors, subsectors, and worlds), matching starts of words (so "sol" matches "Solomani Rim", "Sol", and "Nowa Sol")
- If your search term has the pattern XXXXXXX-X (7-1) the search looks for exact matches of UWPs instead (not prefixes)
- You can also make it explicit and use a uwp: prefix on the search to force UWP matching
- Wildcard searches are supported, using either the % or * character. They mean the same - match zero or more characters. So you could search on R*g*a to find Regina. Note that searches have an implicit wildcard at the end, so that's the same as R*g*a*
A cookie to the first commenter that finds my missing world!Ω
2009-02-18
Search: Better, Faster, Stronger... Geekier
I've taken the plunge - the search feature (and back end of the Search API) is now powered by a real honest-to-Turing database engine. Yes... I've entered the 1970s!
If you were playing with the site for the last hour or so, you may have noticed that search went wonky. As usual, code that worked fine in my staging environment (my laptop) ran into scaling/performance issues when in the production environment - 130k separate INSERT statements took longer than ASP.NET likes to wait. A little fiddling with DataTables and SqlBulkCopy and now a rebuild of the database takes under ten seconds. Hooray!
What you'll find:
If you were playing with the site for the last hour or so, you may have noticed that search went wonky. As usual, code that worked fine in my staging environment (my laptop) ran into scaling/performance issues when in the production environment - 130k separate INSERT statements took longer than ASP.NET likes to wait. A little fiddling with DataTables and SqlBulkCopy and now a rebuild of the database takes under ten seconds. Hooray!
What you'll find:
- Search is better. Instead of exact word matches it will now do stem matches. So "Sol" will find "Solomani Rim (sector)" and "Sol (subsector)"
- Search is faster. Previously, the search was done by creating an in-memory hashtable-based index that could be disposed of at ASP.NET's whim. So the first search on a cold index would take >10 seconds; subsequent searches would be faster... until the server decided to reclaim memory. I don't believe my hosting provider executes the site across multiple hosts, but that's now feasible at least.
- Search is stronger. The database can be rebuilt in a few seconds from the raw data files (and ginormous metadata map) but that will only be necessary on data updates.
- It's not going to give any additional result data back just yet, nor allow searching on other fields. The outstanding request - that should now be easy to service - is to allow searching by UWP. I have the data ready, I just need to write the glue, but I'm out of time for tonight.
- The results are fairly arbitrary - matching sectors, matching subsectors, then matching worlds - and a max of 20 results total. Previously that wasn't a problem, but with the looser matching it could be less than idea. Feedback?
2007-12-29
Bug Fix: Searching
Minor fix here for an issue I noticed myself - if your search results included a sector, when you clicked it wouldn't be centered or scaled reasonably. A little digging found that when I switched from XML to JSON search result processing I'd dropped some of the logic. Clicking the search results now behaves as it did previously.
I also noticed that I wasn't "stemming" words at all, so I threw in a simple rule to drop 's when indexing - try searching on "trin" and you should get 3 results. Ω
I also noticed that I wasn't "stemming" words at all, so I threw in a simple rule to drop 's when indexing - try searching on "trin" and you should get 3 results. Ω
Subscribe to:
Posts (Atom)