----- "Daniel" <gmx.net> wrote:
Could someone please be so kind and tell me whether there exists a
possibility to search (filter) for "dynamic" (calculated) attribute
values, that do not get stored in a backend (in my case bdb)? Idea: An
overlay should calculate a dynamic attribute's value based on already
existing attribute values of an entry each time this dynamic attribute
is searched for using a filter-statement, e.g.
'(&(dynamic-attr-name=xyz)(|((...)(...))...)...)'.
If I use attr_merge() within the search-callback to store the dynamic
test attribute's value "TRUE" or "FALSE" within the entry the search
succeeds without problems - I mean the filter (test=TRUE) get's
processed ok.
So my questions still left is:
Do I always have to store/update the dynamic attribute's calculation
result value within each entry (in the backend) or is there another
posibility that allows filtering for the calculated attribute's value,
while getting rid of the store and update overhead within the
backend?
Hopefully this is no hen and egg problem concerning the internal
processing order of filters, candidates, entries, etc.
Using dynamically computed attrs in a search filter and pretending it to ber indexed is an oxymoron. If you intend to allow it, you need to be prepared to intercepting the search operation and doing the candidate collection yourself. I don't recall any overlay or so that does it and that could be used as an example, simply because it makes little sense. In any case, the problem can be solved, but the solution may not be trivial and require a fair amount of coding.