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

Unable to fetch results by publishing date with eZ Find, using eZ Oracle DFS, MySQL DB

    XMLWordPrintable

    Details

      Description

      When I do a custom fetch, in eZ Oracle, with eZ Find I don't get the correct order. In the last step I get the following:

      searchA:News,Article 2,
      searchB:News,Article 2,

      Steps to reproduce
      Setup - create search content
      
      1. Log in as admin in admin
      2. Click "Content structure" in top menu
      3. Create Folder : News
      4. Click "News" in sub items list
      5. Create Artile : "Article 1":
          Title : Article 1
          Summary : This is a foobar article
      
      6. Create Artile : "Article 2":
          Title : Article 2
          Summary : This is a news article
      
      Tamper with publish date of News folder
      
      1. Click on News folder
      2. Click "Details" tab
      3. Take note of the "Object ID" for the News folder
      4. Connect to the Database using a console client ( mysql,psql, sqlplus etc)
      5. Run the following sql query:
      update ezcontentobject set published=published-31536000 where id=59;
      
      FYI : 31536000 is number of seconds in a year
      id=59, there you should substitute 59 with the actuall object ID found in #3
      
      Republish News folder
      
      1. Edit the News folder and republish it ( in order to update the publish date also in the SOLR index )
      
      Validate search template operator
      
      1. Click "Selenium tests" in top menu
      2. Click "HTML Generator" in left menu
      3. Enter template code:
      {def $searcha=fetch( 'ezfind','search',
                              hash( 'query', 'news',
                                    'offset', $view_parameters.offset,
                                    'limit', $page_limit,
                                    'sort_by', hash( 'score', 'desc' ),
                                    'facet', $defaultSearchFacets,
                                    'filter', $filterParameters,
                                    'publish_date', $dateFilter,
                                    'boost_functions', hash('functions', array('recip(ms(NOW/HOUR,meta_published_dt),4e-12,1000,2)')),
                                    'spell_check', array( true() ) ) )}
      {def $searchb=fetch( 'ezfind','search',
                              hash( 'query', 'news',
                                    'offset', $view_parameters.offset,
                                    'limit', $page_limit,
                                    'sort_by', hash( 'score', 'desc' ),
                                    'facet', $defaultSearchFacets,
                                    'filter', $filterParameters,
                                    'publish_date', $dateFilter,
                                    'spell_check', array( true() ) ) )}
      
      searchA:
      {foreach $searcha.SearchResult as $result}
      {$result.name},
      {/foreach}
      
      searchB:
      {foreach $searchb.SearchResult as $result}
      {$result.name},
      {/foreach}
      
      
      4. Click "Render HTML now" buton
      5. Validate that output is:
      searchA:Article 2,News,
      searchB:News,Article 2,
      

        Attachments

          Activity

            People

            Assignee:
            unknown unknown
            Reporter:
            pedro.resende Pedro Resende
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: