Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CBE1E78F1 for ; Tue, 29 Nov 2011 19:53:28 +0000 (UTC) Received: (qmail 36429 invoked by uid 500); 29 Nov 2011 19:53:28 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 36374 invoked by uid 500); 29 Nov 2011 19:53:28 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 36367 invoked by uid 99); 29 Nov 2011 19:53:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Nov 2011 19:53:28 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ayaselcuk@gmail.com designates 209.85.216.43 as permitted sender) Received: from [209.85.216.43] (HELO mail-qw0-f43.google.com) (209.85.216.43) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Nov 2011 19:53:22 +0000 Received: by qadz3 with SMTP id z3so2186022qad.16 for ; Tue, 29 Nov 2011 11:53:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=XnJYWP0dUWLLwnZheGitkOQLK1J77obSxjEK8RUH2cU=; b=x+rdqLr0WHDwlQ8ROjt9EiIRa1/y4C+AABCIbbkJvGOFyNm3l+p8zCw5Ts8I1+/Nna gbGE84WGLUyNktRf+8PNmsnfpFAL1t7aNlCoYQwAYqc2nPjPFPgT9KEiAK9QJRDVlWOb r67ZZjqex1Uje46OVaoJ0+GHy6KYCixJxq3fE= MIME-Version: 1.0 Received: by 10.182.73.71 with SMTP id j7mr13836002obv.55.1322596381432; Tue, 29 Nov 2011 11:53:01 -0800 (PST) Received: by 10.182.220.106 with HTTP; Tue, 29 Nov 2011 11:53:01 -0800 (PST) Date: Tue, 29 Nov 2011 21:53:01 +0200 Message-ID: Subject: Modification of Index Entries through search engine From: Selcuk AYA To: Apache Directory Developers List Content-Type: text/plain; charset=ISO-8859-1 Hi, I am doing some tests on txns and the following causes problems for the test: most of the default search engine evaluators cast Index to Index or Index and then call the setValue method of the index entry to modify it when there is no index on the attribute. Index entry comes from the uuid cursor. I would like to get rid of this as it is causing problems for the txns layer. Txn layer is maintaining some set of index entries in memory and when they are modified by the search engine it gets confused. In general any layer or cursor which maintained a cache of index entries would get confused in such a scenario. Please let me the reason we change the index entry in such a way and we can hopefully get rid of it. I commented out such code for the cases it caused me trouble and the tests passed. An example is here. ( Note the inconsistency-- setValue is not called for the binary value case): // if the attribute exists and the pattern matches return true if ( attr != null ) { /* * Cycle through the attribute values testing normalized version * obtained from using the substring matching rule's normalizer. * The test uses the comparator obtained from the appropriate * substring matching rule. */ if ( attr.isHumanReadable() ) { for ( Value value : attr ) { String strValue = ( String ) value.getNormValue(); // Once match is found cleanup and return true if ( regex.matcher( strValue ).matches() ) { // before returning we set the normalized value indexEntry.setValue( strValue ); return true; } } } else { // Slightly more complex. We won't be able to use a regex to check // the value. for ( Value value : attr ) { byte[] byteValue = (byte[])value.getNormValue(); // Once match is found cleanup and return true // @TODO : implement this check. /* if ( check( byteValue ) ) { // before returning we set the normalized value indexEntry.setValue( byteValue ); return true; } */ } } regards Selcuk