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 Wed, 05 Feb 2014 19:00:09 GMT
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