Le 3/6/14 6:54 AM, Mark D a écrit :
> Well, you may have helped uncover something.  I thought I had indexes
> When I look at config in ApacheStudio it shows the indexes on the partitions.
> When I looked at config file, I noted the following index attributes were 
> missing.
>
> ads-enabled: TRUE
> ads-indexcachesize: 100
>
> Note, a few partitions I was testing were created dynamically and not through
> the Studio.  Hence I was responsible for those missing.

Definitively, the ads-enabled attribute *must* be TRUE (FALSE is teh
default AFAIR). The other one has a default valu of 100.

>
> So, I added ads-enabled: TRUE to the UID index for the partition.
> Restarted AD.  Ran test search which failed with same results.
> I then added a new entry to the partition and ran search again.
> It now finds the entry with UID.
Expected.
>
> So, it this possibly the issue ? 
Yes, absolutely.

>   When I search with filter (objectClass=namedObject)
> it always worked.  Does 'x=*' have to be indexed, whereas '=' searches 
> anything ?
Those are two different indexes. the (xxx=*) will match every entry
having the xxx attributeType, and we use the prsenceIndex for that, when
the (xxx=blah) use the xxx index to fetch entries having an
attributeType xxx having the value blah.

Note that the (xxx=*) filter will only work *if* xxx is indexed...

One vicious thing is that if uid is not indexed, filters like (uid=blah)
will work, but (uid=*) won't. The reason is that when we have and
indexed attribute like uid, we will use the index to fetch entries , so
here, as we always have a presence index, we will use it, and as uid is
not indexed, we won't find any entry associated with (uid=*).

Now, thinking out loud I think that we are doing a very big disservice
here : just because we do'nt have an index on uid should *never* be an
issue for the user, except that the response time will be way lower. In
other words, indexes should speedup the serahces, not break them.

That deserves a JIRA, IMO.
>
> I have been suffering for a while with so many filters not working with (x=*).
I can understand...
>
> My confusion has been based on
> 1) I was testing with one partition which evidently was a partition created 
> from the Studio
> and I was comparing behavior to the new dynamic created partition.  
> 2) In ADStudio, the configs visually appear the same regarding indexes.
>
> I am back to recreating all test partitions etc and see if this changes 
> things.
I'm quite sure it will work fine if you do that.


In the mean time, I'll create an issue to get the server respect our
users and *always* do the search and return valid entries except when
the index is created *after* the entry has already been created (we
do'nt reindex on the fly, sadly. Note that we should and we will, but
not in this current version).

> Thanks.
>
Thanks to you for having raised this issue !

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 

Reply via email to