Permalink
Browse files

Add a paging model to search.imageweb

  • Loading branch information...
1 parent af0def1 commit c90de4b4e6d97a32451a795c1fe7b55e8eaf27d6 Srinagesh Susarla committed Jun 5, 2009
Showing with 8 additions and 2 deletions.
  1. +8 −2 search/search.imageweb.xml
View
@@ -3,21 +3,27 @@
<meta>
<author>Nagesh Susarla</author>
<documentationURL>See search.web and search.images for more details</documentationURL>
+ <sampleQuery>select * from {table} where query='pizza'</sampleQuery>
</meta>
<bindings>
<select itemPath="results.result" produces="XML">
<urls>
<url></url>
</urls>
+ <paging model="offset">
+ <start id="start" default="0" />
+ <pagesize id="count" max="50" />
+ <total default="10"/>
+ </paging>
<inputs>
<key id="query" type="xs:string" paramType="variable" required="true"/>
</inputs>
-
<execute><![CDATA[
var qs = query;
+ var webquery = 'select * from search.web(' + start + ',' + count + ') where query=@query';
- var search = y.query('select * from search.web(50) where query=@query', {query: qs}).results;
+ var search = y.query(webquery, {query: qs}).results;
var images = [];
default xml namespace='http://www.inktomi.com/';

0 comments on commit c90de4b

Please sign in to comment.