Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-10310

[New search service] Criterion 'Format of resource' is not optimized

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 4.3.0
    • 4.3.0
    • Plugin : Search
    • None
    • 4.3 RC2

      For implementation org.ametys.web.frontoffice.search.metamodel.impl.ResourceFormatSearchCriterionDefinition

       

      It generates at query time (if selecting Text document for instance) :

      (DCFormat:(application/msword))+OR+(DCFormat:(application/vnd.openxmlformats-officedocument.wordprocessingml.document))+OR+(DCFormat:(application/vnd.oasis.opendocument.text))+OR+(DCFormat:(application/rtf))+OR+(DCFormat:(text/rtf))+OR+(DCFormat:(application/x-abiword)) 

      which is :

      1. very annoying to read and understand for debug purposes
      2. not optimized, generating a big OrQuery with many clauses is not optimal

      We should create a new field, specific for the search service (i.e. for org.ametys.web.frontoffice.search.metamodel.impl.ResourceSearchable), and at index-time, it can only have the values:

      • pdf
      • image
      • text
      • pres
      • spreadsheet
      • video
      • audio

      Then at query time, the query will be more readable and more optimized

            Unassigned Unassigned
            sprieul Simon Prieul (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: