One of my players is interested in the RSS feed for all the pages tagged RPG but not in pages tagged Kitsunemori. I assume there are other such tricky requirements. How should I handle it?
1. Add terms to exclude in searches, using a prefix dash: Searching for `tag:oddmuse -tag:wiki` will find no pages containing the tag wiki.
2. Add syntax to do grouping: One of `tag:CrucibleOfFreya tag:TheDistraction tag:VaultOfLarinKarr` *and* `tag:XP` (an artificial example – the problem I had drawing up a realistic example goes to show how artificial the problem is, I guess.
3. Write a feed munger that takes two feeds and produces one *minus* the other. Wouldn’t that be cool? It uses two requests instead of one, but it’s an external solution that might have more applications.
4. Introduce more tags such as `tag:General`.
I’m not sure this is worth looking into. The solutions are either complicated or unwieldy, or both.
Let’s take the last one, for example:
1. It’s a pain to retag old pages.
2. What happens if I discover another “category” in my page database? Retag?
All these solutions will require users to edit their RSS feed subscriptions. Bummer!
#Wikis #Oddmuse
(Please contact me if you want to remove your comment.)
⁂
You knew this was coming. See 2007-06-14 RSS Filters. How cool will it be to have exclusion searching, though? So Search::FreeText doesn’t do exclusion? Bummer. What about Search::Indexer? Doesn’t have multilingual support?
– AaronHawley 2007-08-08 17:28 UTC
---
Yikes, you know my own blog better than I do! 😄
Yeah, I’d have to implement it as two searches and a minus set operation. And I’d have to do it at least twice: For ordinary search, and for indexed search. :__
– Alex Schroeder 2007-08-08 18:10 UTC
---
Yeah, that’s nasty. I know Perl handles arrays of strings well, but I’m sure its support of set operations on arrays are weak at best.
– AaronHawley 2007-08-08 19:57 UTC
---
Well, it’s not too bad when mapping one of the lists into a hash:
`perl -e '@one=("a", "b", "c"); @two=("c", "d"); %one = map { $_ => 1 } @one; foreach $item (@two) { delete $one{$item} }; print join(", ", keys %one), "\n";'`
⇒ a, b
It’s just that this looks like a lot of unfun work for something that I myself practically never use with search engines.
– Alex Schroeder 2007-08-08 21:11 UTC