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

Document how to make a custom Search Criterion and Sort Clause

    Details

    • Type: Story Story
    • Status: Backlog
    • Priority: High High
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Documentation
    • Labels:

      Description

      Currently there are no advance doc on how to create Criterion and SortClauses. FacetBuilder neither, but it's at least hinted about where to look in that case.

      For a partner I referred them to the following urls to be able to understand how to do it by looking at how it's implemented in kernel, and this should be enough for a dev/ps to write a tutorial on. I used ContentTypeIdentifer as example.

      1. Creating a Criterion (API part)
      https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Publish/API/Repository/Values/Content/Query/Criterion/ContentTypeIdentifier.php

      2. Setting up CriterionHandler for Legacy Search Engine (DB) and Parser/Visitor for REST:
      (besides the config you also need to create similar classes as those refered to there)
      https://github.com/ezsystems/ezpublish-kernel/search?l=YAML&q=ContentTypeIdentifier&utf8=%E2%9C%93

      3. Setting up visitors for Solr search engine:
      typically needs one per operator supported (EQ, LIKE, ..)
      https://github.com/ezsystems/ezplatform-solr-search-engine/search?l=YAML&q=ContentTypeIdentifierIn&utf8=%E2%9C%93

      Similar approach can be taken for documenting creating custom sort clause.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            André Rømcke
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: