manifoldcf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Wright <daddy...@gmail.com>
Subject Re: [Solr Output Connector] Keep All Metadata Flag broken
Date Mon, 10 Feb 2014 13:56:36 GMT
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 <daddywri@gmail.com> 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 <daddywri@gmail.com> 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 <daddywri@gmail.com> 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
>>>>
>>>
>>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message