Bug 693451 - cannot use localized matching rules
Summary: cannot use localized matching rules
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Database - Indexes/Searches
Version: 1.2.8
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 639035 389_1.2.8 693519
TreeView+ depends on / blocked
 
Reported: 2011-04-04 17:47 UTC by Rich Megginson
Modified: 2015-12-07 17:12 UTC (History)
1 user (show)

(edit)
Clone Of:
: 693519 (view as bug list)
(edit)
Last Closed: 2015-12-07 17:12:30 UTC


Attachments (Terms of Use)
0002-Bug-693451-cannot-use-localized-matching-rules.patch (4.22 KB, patch)
2011-04-04 21:10 UTC, Rich Megginson
nkinder: review+
Details | Diff

Description Rich Megginson 2011-04-04 17:47:26 UTC
configuring an index entry to generate localized matching rules using the collation plugin does not work

cn=description,cn=index,cn=userRoot,....
nsMatchingRule: 2.16.840.1.113730.3.3.2.11.1
...

after adding this, and re-indexing/re-importing, the description.db4 index does not contain entries like
:2.16.840.1.113730.3.3.2.11.1:somevalue
...

Comment 1 Rich Megginson 2011-04-04 21:10:12 UTC
Created attachment 489856 [details]
0002-Bug-693451-cannot-use-localized-matching-rules.patch

Comment 2 Rich Megginson 2011-04-05 01:42:13 UTC
To ssh://git.fedorahosted.org/git/389/ds.git
   27ff25d..466fced  master -> master
commit cb2239082a27f00d470754e5924311bd9bee4b34
Author: Rich Megginson <rmeggins@redhat.com>
Date:   Fri Apr 1 19:10:54 2011 -0600
    Reviewed by: nkinder (Thanks!)
    Branch: master
    Fix Description: With the new matching rule code, the old method of
    identifying a simple matching rule that can use a compare function is
    not valid.  All of the collation plugin matching rules are ordering,
    either ignore case or exact case.  So we need another way to tell if
    the matching rule can use a simple compare function to generate index
    keys.  The new function
    int slapi_matchingrule_can_use_compare_fn(const char *mr_oid_or_name);
    is used for this purpose.  It looks up the oid of the matching rule and
    compares it to the oids used by the collation plugin.
    Platforms tested: RHEL6 x86_64
    Flag Day: no
    Doc impact: no

Comment 3 Rich Megginson 2011-04-05 02:08:44 UTC
To ssh://git.fedorahosted.org/git/389/ds.git
   e2288d9..5c1cd5f  389-ds-base-1.2.8 -> 389-ds-base-1.2.8
commit ee0ab6921fbc6a92a554faa3218c36851b5cfe30
Author: Rich Megginson <rmeggins@redhat.com>
Date:   Fri Apr 1 19:10:54 2011 -0600

Comment 4 Amita Sharma 2011-04-26 13:19:31 UTC
1. [root@rheltest amsharma]# ldapmodify -a -D "cn=directory manager" -w
Secret123 -p 389 -h localhost << EOF
> dn: cn=description,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config
> nsMatchingRule: 2.16.840.1.113730.3.3.2.11.1
> nsIndexType: eq
> nsIndexType: pres
> nsIndexType: sub
> nsSystemIndex: false
> objectClass: top
> objectClass: nsIndex
> cn: description
> EOF
adding new entry "cn=description,cn=index,cn=userRoot,cn=ldbm
database,cn=plugins,cn=config"

2. [root@rheltest slapd-rheltest]# ./db2index.pl -D "cn=Directory Manager" -w
Secret123 -n userRoot -t description
adding new entry "cn=db2index_2011_4_26_16_29_19, cn=index, cn=tasks,
cn=config"

3. [root@rheltest userRoot]# dbscan -f description.db4 | grep
\^\:2.16.840.1.113730.3.3.2.11.1\:
:2.16.840.1.113730.3.3.2.11.1:J4HJB4%06X:H%060,F%06D,F,84%06,00HTFR<F8%064FRN<4P%00
:2.16.840.1.113730.3.3.2.11.1:J4HJB4%06X:H%060,F%06D,F,84%064F8<F44N%064FRN<4P%00
:2.16.840.1.113730.3.3.2.11.1:J4HJB4%06X:H%060,F%06D,F,84%06:N%064FRN<4P%00
:2.16.840.1.113730.3.3.2.11.1:J4HJB4%06X:H%060,F%06D,F,84%06L,%064FRN<4P%00
:2.16.840.1.113730.3.3.2.11.1:PJ40<,B%06,2D<F<PRN,R<V4%06,00HTFRP%00


Marking the bug as VERIFIED.


Note You need to log in before you can comment on or make changes to this bug.