[Date Prev][Date Next]
Re: filter in shell backend
Well, one reason certainly would be performance. If you get all unfiltered
results from a datastore instead of only the ones you actually need, this
is quite a difference for large databases (mine currenlty consists of
5 million entires), especially if the data resides on a different machine
and has to be transferred over the network. To get them all data instead
of only the needed one would be totally unacceptable.
> I have been writing a shell backend and recognized that filters should
> be implemented in the backend. At first I tried to figure out what
> other backends do to implement filters to implement them in my backend
> Later on I discovered that implementing filters in the shell-backend
> interface was quite simple. I simply had to add the filter to the
> parameter list of read_and_send_results() and put if( test_filter() )
> around send_search_entry() in result.c.
> Now my shell backend sends all entries to slapd in spite of filters and
> slapd applies them.
> It was so simple that I wonder if there is another reason that the
> shell backend interface was implemented that way.