{"id":17236309,"url":"https://github.com/jaedb/search","last_synced_at":"2025-04-14T02:14:52.888Z","repository":{"id":32497650,"uuid":"135108497","full_name":"jaedb/Search","owner":"jaedb","description":"SilverStripe search engine","archived":false,"fork":false,"pushed_at":"2023-11-02T21:53:10.000Z","size":264,"stargazers_count":0,"open_issues_count":5,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T02:14:40.273Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaedb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-28T04:12:36.000Z","updated_at":"2018-08-28T03:35:39.000Z","dependencies_parsed_at":"2024-10-15T05:35:55.319Z","dependency_job_id":"6803eaf5-d54b-47a1-814d-a374d4a8e18d","html_url":"https://github.com/jaedb/Search","commit_stats":{"total_commits":29,"total_committers":1,"mean_commits":29.0,"dds":0.0,"last_synced_commit":"ded729c81429f8cae659b6b7d66176cb4a40d63b"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaedb%2FSearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaedb%2FSearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaedb%2FSearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaedb%2FSearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaedb","download_url":"https://codeload.github.com/jaedb/Search/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248809059,"owners_count":21164896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T05:35:52.978Z","updated_at":"2025-04-14T02:14:52.869Z","avatar_url":"https://github.com/jaedb.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\r\nThe built-in SilverStripe search form is a very simple search engine. This plugin takes SQL-based searching to the next level, without requiring the implementation of a full-blown search engine like Solr or Elastic Search. It is designed to bring data-oriented filters on top of the simple text search functionality.\r\n\r\n\r\n# Requirements\r\n\r\n* SilverStripe 4\r\n\r\n\r\n# Usage\r\n\r\n* Create a `SearchPage` instance (typically at the root of your website). This page only is used to display results, so please refrain from creating multiple instances.\r\n* Configure your website's `_config/config.yml` to define search parameters.\r\n* Run `dev/build` to instansiate your new configuration\r\n\r\n\r\n# Configuration\r\n* `types`: associative list of types to search\r\n  * `Label`: front-end field label\r\n  * `Table`: the object's primary table (note `_Live` suffix for versioned objects)\r\n  * `ClassName`: full ClassName\r\n  * `ClassNameShort`: namespaced ClassName\r\n  * `Filters`: a list of filters to apply pre-search (maps to `DataList-\u003eFilter(key =\u003e value)`)\r\n  * `Columns`: columns to search for query string matches (format `Table.Column`)\r\n* `filters`: associative list of filter options\r\n  * `Structure`: defines the filter's relational structure (must be one of `db`, `has_one` or `has_many`)\r\n  * `Label`: front-end field label\r\n  * `Table`: relational subject's table\r\n  * `Column`: column to filter on\r\n  * `Operator`: SQL filter operator (ie `\u003e`, `=`)\r\n  * `JoinTables`: associative list of relationship mappings (use the `key` from the `types` array)\r\n    * `Table`: relational join table\r\n    * `Column`: column to join by\r\n * `sorts`: associative list of sort options\r\n   * `Label`: front-end field label\r\n   * `Sort`: SQL sort string\r\n\r\n\r\n# Example configuration\r\n\r\n```\r\n---\r\nName: search\r\nBefore:\r\n    - '#site'\r\n---\r\nJaedb\\Search\\SearchPageController:\r\n  types:\r\n    docs:\r\n      Label: 'Documents'\r\n      Table: 'File_Live'\r\n      ClassName: 'SilverStripe\\Assets\\File'\r\n      ClassNameShort: 'File'\r\n      Filters:\r\n        File_Live.ShowInSearch: '1'\r\n      Columns: ['File_Live.Title','File_Live.Description','File_Live.Name']\r\n    pages:\r\n      Label: 'Pages'\r\n      ClassName: 'Page'\r\n      ClassNameShort: 'Page'\r\n      Table: 'Page_Live'\r\n      Filters: \r\n        SiteTree_Live.ShowInSearch: '1'\r\n      JoinTables: ['SiteTree_Live']\r\n      Columns: ['SiteTree_Live.Title','SiteTree_Live.MenuTitle','SiteTree_Live.Content']\r\n  filters:\r\n    updated_before:\r\n      Structure: 'db'\r\n      Label: 'Updated before'\r\n      Column: 'LastEdited'\r\n      Operator: '\u003c'\r\n    updated_after:\r\n      Structure: 'db'\r\n      Label: 'Updated after'\r\n      Column: 'LastEdited'\r\n      Operator: '\u003e'\r\n    tags:\r\n      Structure: 'many_many'\r\n      Label: 'Tags'\r\n      ClassName: 'Tag'\r\n      Table: 'Tag'\r\n      JoinTables:\r\n        docs: \r\n          Table: 'File_Tags'\r\n          Column: 'FileID'\r\n        pages: \r\n          Table: 'Page_Tags'\r\n          Column: 'PageID'\r\n  sorts:\r\n    title_asc:\r\n      Label: 'Title (A-Z)'\r\n      Sort: 'Title ASC'\r\n    title_desc:\r\n      Label: 'Title (Z-A)'\r\n      Sort: 'Title DESC'\r\n    published_asc:\r\n      Label: 'Publish date (newest first)'\r\n      Sort: 'DatePublished DESC'\r\n    published_desc:\r\n      Label: 'Publish date (oldest first)'\r\n      Sort: 'DatePublished ASC'\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaedb%2Fsearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaedb%2Fsearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaedb%2Fsearch/lists"}