<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
ah, very helpful.<br>
thanks for this Olly!<br>
<br>
Cheers<br>
Alec<br>
<br>
Olly Betts wrote:
<blockquote cite="mid20060407004059.GJ27129@survex.com" type="cite">
  <pre wrap="">On Thu, Apr 06, 2006 at 04:17:44PM -0700, Alexander Lind wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">i want to add a feature so that you can search within a search - search 
on a subset.

i haven't yet started working on it, but as far as i can tell, there 
seems to be no easy way of doing this.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
If the original query is orig_query and the new query is new_query then
"search for new_query within the results of orig_query" is:

    Query(Query::OP_FILTER, new_query, orig_query)

If it's soon after "orig_query" was run then that should be efficient
too, since the Btree blocks used for the original query will be cached.

It's not possible to do it more directly - Xapian's matcher does the
minimum amount of work possible, so if you ask for 10 hits it stops
after it's sure it has the best 10 - the complete set of matches isn't
calculated so it doesn't make sense to save it to be searched within.

Cheers,
    Olly

  </pre>
</blockquote>
</body>
</html>