2017 © Pedro Peláez
 

symfony-bundle search

Trinity Search bundle

image

trinity/search

Trinity Search bundle

  • Saturday, December 2, 2017
  • by modpreneur
  • Repository
  • 16 Watchers
  • 1 Stars
  • 4,065 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

Trinity Search

Coverage Status Build Status, (*1)

Trinity search is part of Trinity package., (*2)

Description:, (*3)

  • Finds array of objects by given query

Base route:, (*4)

/admin/search/{entity}/?q=

Syntax

Append query to the base route. Query can be composed of:, (*5)

  • (optional) Column selection - put columns which you want to return into simple brackets. If you want to access column from associated table, simply put colon and name of the column from associated table
(column1,column2,column3,column4:attributeFromAssociatedTable:anotherAttribute)
  • (optional) Conditions - put conditions into curly brackets. Available operators: <, >, =, <=, >=, !=, AND, OR
{column1 > 500 AND column2 < 800 OR (column3 = <str>JohnDoe</str> AND column4 <= 20)}
  • String Values must be wrapped inside block
{name = <str>Jack</str> AND description LIKE <str>%it started as "game"%</str>}
  • (optional) Limit - for limit 5 rows simply append
LIMIT=5
  • (optional) Offset - for offset 10 rows simply append
OFFSET=10
  • (optional) Ordering - for ordering result, append keyword ORDER BY and then columns and directions by which you want to order, multiple columns ordering are supported - separate columns by comma
ORDERBY column1 ASC, column2 DESC


, (*6)

Example
/admin/search/product/?q=
(id,name,defaultBillingPlan:initialPrice)
{defaultBillingPlan:initialPrice > "14"} LIMIT=10 OFFSET=0 ORDERBY clients:name ASC, defaultBillingPlan:initialPrice DESC

The Versions