Wednesday, July 11, 2007

Search Multiple Labels in Blogger Feeds

For lack of writing of personal post topics, here is some more filler material.

As people have found it useful to be able to search multiple labels in GMail, I spent a few more brain cycles figuring how to hack multiple label searches in Blogger. Here is a functional approximation using the blog feed. For more details, see the Google Data APIs Protocol Reference.

This requires a browser that displays feeds nicely, such as Firefox or Netscape.

To find posts labeled with all of multiple labels:


http://<subdomain>.blogspot.com/feeds/posts/default/-/<label1>/<label2>/.../<labelN>

In other words, the blogspot feed URL, followed by /- to indicate the beginning of a list of labels, followed by the slash-separated label names.

For example, to find all posts on this blog labeled both dance and fashion:

http://waltz.blogspot.com/feeds/posts/default/-/dance/fashion


Negations (exclude a label) and disjunctions (or) are not supported yet:

http://waltz.blogspot.com/feeds/posts/default/-/dance/-fashion

http://waltz.blogspot.com/feeds/posts/default/-/dance%7Cfashion

11 comments:

Peter Cruickshank said...

That is brilliant! Thank you so much!

dancing dragon said...

Thanks for visiting and commenting. I suppose if you wanted this functionality to display on your blog, it would take some extra programming work. Or convince Blogger to provide it. :)

GMaximus said...

Thanks!

I wonder if there are some other blog sites offering such a solution in a "fair" way.

Anyway, that's a really good work, and i'll use it in my blog.

Would be much better though if there was a more convenient way to use this method, maybe involving some Javascript to minimize manual typing-job while searching.

HappyMonster said...

Hello! I am also intrested in this subject. With Google Blog API, you just need a way to make query and show the result data in blog.

To show result, there are already some hacks to do this, like AJAX Label. And Blogger already has a feed control to show rss and atom. Then add some way to make query, you get a search.

For searching other blog, try use JSONP or Google Feed API.

I has done some tryout, but my blog is in chinese. It accepts input like Label/Label/Label for multiple labels search, and to search local blog, you can drag and drop from label cloud below. Click [+/-...], there are more options: blog url, order by published or updated, and date range.

Technorati also can do multiple tags search. To search posts with jquery and prototype tags in ajxaian.com, try this. Technorati advanced search page seems has no input to limiting target site for tags query. So add the "from" parameter manually and the query url works.

Hope this will help.

Wayne Doucette said...

This is exactly what I was looking for!

In my case, I touch on a lot of different issues that aren't relevant to relevant to all subscribers as in the case of my multiple issues blog.

I don't want to manage seperate blogs, so this will be great to burn custom feeds with!

Thanks!

Nom ou pseudonyme de l'élève said...

Hi, do you know if this "multiple tags search" option have been enabled yet ?

Dead Widget Society said...

This is fantastic I love it. I have a similar question instead of searching multiple labels could this be altered to search multiple blogs. I have several blogs that are related and I would like to be able to search all blogs from any given blog, possible.

Drea Erimentha said...

For everyone who has found this recently.... this can now be accomplished using the "search" box [if enabled] on the blog.

In the search box type:

"label:[labelname1], label:[labelname2]" etc. for all the labels you want to search.

kawsar said...

Hi this idea sounds amazing is there a way to have a label search navigation bar with a drop down button on each Collum so you enter your labels on each drop down menu manually then the user can combine the labels on each drop down Collum and hit the search bar and only those labels contained in the drop down box that match each post will appear, this will be amazing, so any ideas or tips 
Thanks

월풍 said...

Whoooooooooa!!!!!!!!
Your post saves me.
Thanks a lot!:D

Charaf Erraiss said...

Thanks a lot