Xapian::QueryParser (was Re: [Xapian-devel] Re: [Xapian-commits] Changes in xapian/xapian-applications/queryserver/ xapian/xapian-applications/queryserver/source/)

Olly Betts olly@survex.com
Thu, 13 May 2004 20:59:48 +0100


On Thu, May 13, 2004 at 06:33:58PM +0100, James Aylett wrote:
> On Thu, May 13, 2004 at 06:21:37PM +0100, Olly Betts wrote:
> 
> > > I'm doing a fair amount of hacking on the Perl bindings atm, and it
> > > occurs to me that this would be a useful feature, even if I have to do
> > > it in the perl wrapper.
> > 
> > It would be nice to have it wrapped too.  Having it in a separate directory
> > is rather an arbitrary historical thing.
> 
> Well, it should be an a separate directory still. It's just it
> probably shouldn't be in 'extra', but 'queryparser' or something.

I mean the way it's a separate header and library stuck away by
themselves in the source tree.

Although having it as a separate library isn't so bad.  It would be nice
if the library could be split a bit more, at least from a conceptual
point of view - if you wanted to create a search frontend on an embedded
device, it could be desirable to be easily able to completely exclude
indexing functionality.

Under Unix, the linker should do a good job of excluding unused code
when using static libraries, and the VM should do a good job of not
loading unused code with shared libraries.  Hopefully Windows is the
same.

> > > IIrc, the python bindings do something similar - do they just use
> > > ::QueryParser under the hood?
> > 
> > I'd imagine so.
> 
> Indeed, as do any other SWIG bindings. They're in the same module as
> the rest of Xapian (and as the stemming class), which is perhaps not
> quite right. But SWIG is a pain to get working across multiple
> modules, so I'm not even going to think about trying.

I wouldn't worry about that too much.

> Java doesn't have wrappers for QueryParser. I guess SWIG just makes it
> an awful lot easier.

Hmm, I'd forgotten about that.  Eric has his own query parser written in
Java.  But for consistency we ought to have the "standard" one
available.

Cheers,
    Olly