Return-Path: X-Original-To: apmail-manifoldcf-dev-archive@www.apache.org Delivered-To: apmail-manifoldcf-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 75A8910F49 for ; Wed, 5 Feb 2014 19:00:36 +0000 (UTC) Received: (qmail 69500 invoked by uid 500); 5 Feb 2014 19:00:35 -0000 Delivered-To: apmail-manifoldcf-dev-archive@manifoldcf.apache.org Received: (qmail 69380 invoked by uid 500); 5 Feb 2014 19:00:35 -0000 Mailing-List: contact dev-help@manifoldcf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@manifoldcf.apache.org Delivered-To: mailing list dev@manifoldcf.apache.org Received: (qmail 69247 invoked by uid 99); 5 Feb 2014 19:00:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Feb 2014 19:00:34 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of daddywri@gmail.com designates 209.85.213.47 as permitted sender) Received: from [209.85.213.47] (HELO mail-yh0-f47.google.com) (209.85.213.47) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Feb 2014 19:00:30 +0000 Received: by mail-yh0-f47.google.com with SMTP id c41so887238yho.6 for ; Wed, 05 Feb 2014 11:00:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=zZagSAC9+lvuR+AuR41PXtk6aGmtI2d9fjq63LE2WY4=; b=jU8nm5UNSDj7aaUCttSHWQsIxCel30JMBDSpWEzOPnWxo3KOb2yw/ROKERNczmeHSo WalLPcFK8jGCdKaHgrBjvjT0tgAspNUL/D3AAEKYVEvmzLKGRz88gceglEkXLzelNYcp AiYOdh1+lSzZ6ZNBlBRjn4HDbDPu1lJXfeokHFfmeFCzWm0Z2zaPN5GlSYX96VzoYSAG B6QlO159HlZcjovK3JRkrsqcowyJnUAu4qD3o2h2tW7+eakPPiepZvqG5iD2ETFiy7Aa vvbKWelJ4f3I82g+r81S4oMmSn0vgnHQBzPtHNYwW5pSXPgN40QpItJwmsP7MyJq8Kq7 oZZA== MIME-Version: 1.0 X-Received: by 10.236.26.17 with SMTP id b17mr2824798yha.77.1391626809576; Wed, 05 Feb 2014 11:00:09 -0800 (PST) Received: by 10.170.187.82 with HTTP; Wed, 5 Feb 2014 11:00:09 -0800 (PST) In-Reply-To: References: Date: Wed, 5 Feb 2014 14:00:09 -0500 Message-ID: Subject: Re: [Solr Output Connector] Keep All Metadata Flag broken From: Karl Wright To: dev Content-Type: multipart/alternative; boundary=089e014953a4a5100304f1ad5d2e X-Virus-Checked: Checked by ClamAV on apache.org --089e014953a4a5100304f1ad5d2e Content-Type: text/plain; charset=ISO-8859-1 Sorry, that should have been: unpacking: // extract keep all metadata Flag boolean keepAllMetadata = true; if (index < outputDescription.length()) { keepAllMetadata = (outputDescription.charAt(index++) == '+'); } ... and here's the packing: boolean keepAllMetadata = true; while (i < spec.getChildCount()) { SpecificationNode sn = spec.getChild(i++); if(sn.getType().equals( SolrConfig.NODE_KEEPMETADATA)) { String value = sn.getAttributeValue(SolrConfig.ATTRIBUTE_VALUE); keepAllMetadata = Boolean.parseBoolean(value); } ... } ... // Keep all metadata flag if (keepAllMetadata) sb.append('+'); else sb.append('-'); On Wed, Feb 5, 2014 at 1:58 PM, Karl Wright wrote: > Hi Alessandro, > The implementation was changed from the patch, for two reasons: first, > because of backwards compatibility requirements, and second because the > packing/unpacking was taking place at the wrong time. Here's the unpacking: > > boolean keepAllMetadata = true; > while (i < spec.getChildCount()) { > SpecificationNode sn = spec.getChild(i++); > > if(sn.getType().equals(SolrConfig.NODE_KEEPMETADATA)) { > String value = sn.getAttributeValue(SolrConfig.ATTRIBUTE_VALUE); > keepAllMetadata = Boolean.parseBoolean(value); > } > ... > > } > > // extract keep all metadata Flag > boolean keepAllMetadata = true; > if (index < outputDescription.length()) > { > keepAllMetadata = (outputDescription.charAt(index++) == '+'); > } > > > ... and here's the packing: > > // Keep all metadata flag > if (keepAllMetadata) > sb.append('+'); > else > sb.append('-'); > > > This looks correct to me. What does your debugging session show? > > Karl > > > > > On Wed, Feb 5, 2014 at 12:44 PM, Alessandro Benedetti < > benedetti.alex85@gmail.com> wrote: > >> Hi guys, >> the flag keep All Metadata is broken. >> After a debug session >> In this line, whatever you click in the ui you get keepAllMetadata=true : >> >> >> Class : >> SolrConnector >> >> Code : >> >> // extract keep all metadata Flag >> boolean keepAllMetadata = true; >> if (index < outputDescription.length()) >> { >> keepAllMetadata = (outputDescription.charAt(index++) == '+'); >> } >> >> It seems the implementation has been a little bit changed from our >> original >> patch... >> Am I wrong ? Any hint ? >> >> Cheers >> >> >> >> -- >> -------------------------- >> >> Benedetti Alessandro >> Visiting card : http://about.me/alessandro_benedetti >> >> "Tyger, tyger burning bright >> In the forests of the night, >> What immortal hand or eye >> Could frame thy fearful symmetry?" >> >> William Blake - Songs of Experience -1794 England >> > > --089e014953a4a5100304f1ad5d2e--