Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-18468

moreLikeThis query, when passed a node ID or object ID, does not specify an installation ID

    XMLWordPrintable

Details

    Description

      query type 'nid' or 'oid' can cause clashes if you are indexing multiple installations with the same node or object ID. This obviously results in unpredictable moreLikeThis results, since Solr simply fetches the first record that matches the object or node ID.

      You can see this in ezfeZPSolrQueryBuilder::buildMoreLikeThis(), as the queries built are simply:

              $mltVariant = 'q';
              switch ( strtolower ($queryType) )
              {
                  case 'nid':
                      $mltQuery = eZSolr::getMetaFieldName( 'node_id') . ':' . $query;
                      break;
                  case 'oid':
                      $mltQuery = eZSolr::getMetaFieldName( 'object_id') . ':' . $query;
                      break;
      

      $mltQuery should, by default, automatically append the installation ID of the current site. Also, the moreLikeThis fetch function should support an extra parameter for the installation ID.

      Attachments

        Activity

          People

            dp@ez.no dp@ez.no
            gl gl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: