YQ it! Contextual search from your blog 2005-03-06


Since I highlighted My Yahoo! Search (I work for Yahoo!, though not doing search) earlier I have to mention Y!Q as well. Y!Q is a new Yahoo! service that automatically generate a query based on words extracted from data you give it.


I've added Y!Q to my blog on an experimental basis, and here is what to add to your template if you use Movable Type.
It does a quite good job at finding relevant queries, and I'm looking forward to seeing how it works out...

Inside the <head> tag:

<script language="javascript" type="text/javascript" src="http://yq.search.yahoo.com/javascript/yq.js"></script>

And replace <$MTEntryBody$> with:

<div class="yqcontext">
<$MTEntryBody$>
<form class="yq" action="http://yq.search.yahoo.com/search" method="post">
<input type="hidden" name="context" value="<$MTEntryExcerpt$>" />
<div class="yqact">
<input class="yqbt" type="submit" value="Search Related Info"
onclick="return activateYQ(this)" />
</div>
</form>
</div>

Note that I'm using MTEntryExcerpt instead of the full body both because of size but also because MTEntryBody expands with HTML tags, which messes up the form.


blog comments powered by Disqus