Hi Alessandro, In prep for an eventual 1.5.1 release, I pulled up this ticket (and others) to the release-1.5-branch. So if you need this feature, you can get it by checking out branches/release-1.5-branch and building.
Thanks, Karl On Wed, Feb 5, 2014 at 3:19 PM, Karl Wright <[email protected]> wrote: > The code was right, but there was two lines of spurious unpack code in > there left over from some previous connector modification. See > CONNECTORS-882. I've attached a patch to the ticket; if there's another RC > of 1.5 I'll pull it up there as well. But I don't think we should spin > another RC for this problem alone. > > Karl > > > On Wed, Feb 5, 2014 at 2:00 PM, Karl Wright <[email protected]> wrote: > >> 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 <[email protected]> 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 < >>> [email protected]> 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 >>>> >>> >>> >> >
