[Xapian-discuss] Re: searching and sorting by date

James Aylett james-xapian at tartarus.org
Thu Mar 30 17:04:41 BST 2006


On Thu, Mar 30, 2006 at 04:36:29PM +0100, Olly Betts wrote:

> > Attached a patch against svn HEAD - should work against 0.9.4 as well,
> 
> I'm a little concerned at the idea of adding piecemeal little extras
> like this to particular language bindings.  Once we add something, users
> will expect it to remain there and working and we don't want to paint
> ourselves into a corner by neglecting the big picture.

That's exactly why I haven't committed it - it's a pretty quick
addition just to get it to work and demonstrate the utility of it.

> But if having Database.enquire() and Database.query() is desirable for
> Python then why not for the other bindings, and indeed for the C++ API?

I'm inclined to think we want it in the C++ API.

> > This was a little confusing a while ago, when we renamed half
> > the concepts around documents - fields are strings with arbitrary
> > names, while values are integer-numbered strings. (Values are of very
> > specific use; you tend to use fields when displaying stuff about a
> > document.)
> 
> To my knowledge, we only renamed "keys" to "values" (because key is a
> rather overloaded term already).

Probably. I remember discussions being more complex than that, but I
may be making that up. :)

> > +<dt><code>flags</code></dt>
> > +<dd>Flags to pass to <code>QueryParser::parser_query()</code>, defaulting to 0 (no flags)</dd>
> 
> The default value for the QueryParser flags in C++ isn't 0.

Ah. You're absolutely right, of course - in my defense, I was reading
the API documentation as if it was giving me a list of options, rather
than the default value. Mea culpa.

If we do this in C++, it'll be much easier to get it right because we
can use overloading.

J

-- 
/--------------------------------------------------------------------------\
  James Aylett                                                  xapian.org
  james at tartarus.org                               uncertaintydivision.org



More information about the Xapian-discuss mailing list