[Xapian-discuss] Query::Query() in PHP, also QueryParser::prefixes

James Aylett james-xapian@tartarus.org
Thu, 27 May 2004 17:45:06 +0100

On Thu, May 27, 2004 at 05:29:58PM +0100, Olly Betts wrote:

> I wouldn't be averse to hiding the implementation here.  The main reason
> it's not already is because the queryparser class was pulled out of
> omega and never really cleaned up fully.
> The major obstacle is that you end limiting what can be done or exposing
> all the container methods via the class API.  For example, just a get
> and set pair don't allow you to delete a prefix, delete all prefixes
> (i.e. self->prefixes.clear()), iterate through all prefixes, ...
> Not all operations are that useful though.  We could look at how omega
> uses these members and start from there.

omega only uses prefixes.insert(). I think that having set_prefix(),
get_prefix(), clear_prefix() and clear_prefixes() would give enough,
to be honest. Given that the client app has set to the prefixes, the
main reason for getters and iteration is to avoid duplicate data, and
I doubt it'll happen very often.


  James Aylett                                                  xapian.org
  james@tartarus.org                               uncertaintydivision.org