lucy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew S. Townley" <>
Subject [lucy-user] Question about query parsing API
Date Fri, 25 Feb 2011 12:41:02 GMT
Hi Folks,

Me again.

Another issue I just hit with Ferret (actually, the same root problem, but manifested in a
different way) made me wonder something else about the design of lucy: the query parsing API.

Is lucy's QueryParser API effectively this one?

If so, is there a way to traverse the query parse tree (or get a callback notification when
it matches terms)?  What I need to be able to do is take an arbitrary fulltext search query
and then determine whether any search fields have been requested explicitly.  I suppose a
more ideal solution would be to have a #target_fields method or something on the query object,
but that would just be convenience.

The problem I'm having with Ferret is that the query objects are effectively opaque to Ruby,
and there's no bubbling of either the terms or the fields to the top-level query object. 
Is this sort of thing possible in lucy?

I know there's no Ruby bindings yet, but if I'm planning on migrating to lucy anytime soon
after the immediate crisis is over, I want to at least design my interfaces with that in mind.

Also, I mentioned SWIG in passing the other day in a previous message.  Would it not be possible
to just generate the bindings for Ruby with SWIG?

I did a couple of Ruby/GTK+ bindings (GtkHTML3 and WebKit), and the issue there is that it
was all hand-coded C.  Trying to track a fast moving target like I was with WebKit proved
to be nearly impossible, and I eventually gave up.  In this case, there wasn't any other way
to do it because the rest of the bindings for GLib/GTK+/GNOME were all hand-coded, but I wouldn't
ever want to go down that path again. ;)

Thanks in advance,

Andrew S. Townley <>

View raw message