Details

      Description

      I've got an issue on doing a search with the SolR class and trying to sort by a date field.
      Apparently the mapping on not multivalued field was not done correctly and the mapFieldValuesForReturn function of ezcSearchSolrHandler was returning an error.
      After analysis, the mapping is done on values that could be either string / numbers or arrays.

      Here's the fix I've done for this function :

      public function mapFieldValuesForReturn( $field, $values )
      {
      if ( $field->multi )
      {
      foreach ( $values as &$value )

      { $value = $this->mapFieldValueForReturn( $field->type, $value ); }

      }
      else
      {
      if ( is_array($values) )

      { $values = $values[0]; }

      $values = $this->mapFieldValueForReturn( $field->type, $values[0] );
      }
      return $values;
      }

      It was critical as the handler did the query but cannot fill the object in return, so no results in the search.
      If it can be quickly integrated in a release, it would be cool.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              wascou Maxime THOMAS - Wascou.org
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified