PHP 클래스 Spatie\SearchIndex\Query\Algolia\SearchQuery

파일 보기 프로젝트 열기: spatie/searchindex 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$aroundRadius integer
$dateRestrictions array
$facets array
$hitsPerPage integer
$lat integer
$lng integer
$numericFilters array
$page integer
$query
$useLocationAwareSearch boolean

공개 메소드들

메소드 설명
aroundLocation ( integer $lat, integer $lng, integer $aroundRadius = 30000 ) Create a location aware search.
searchFor ( mixed $query ) : SearchQuery Set the query to search for.
setHitsPerPage ( integer $hitsPerPage ) : SearchQuery
setPage ( integer $page ) : SearchQuery
toArray ( ) : array Get the query as an array.
withDateRestriction ( string $dateFieldName, string $operation, DateTime $date ) Set a date restriction.
withFacet ( string $name, string $value ) Set a facet.
withNumericFilter ( string $name, string | array $values, string $logicalOperator = 'and' ) Set a numeric filter.

메소드 상세

aroundLocation() 공개 메소드

Create a location aware search.
public aroundLocation ( integer $lat, integer $lng, integer $aroundRadius = 30000 )
$lat integer
$lng integer
$aroundRadius integer

searchFor() 공개 메소드

Set the query to search for.
public searchFor ( mixed $query ) : SearchQuery
$query mixed
리턴 SearchQuery

setHitsPerPage() 공개 메소드

public setHitsPerPage ( integer $hitsPerPage ) : SearchQuery
$hitsPerPage integer
리턴 SearchQuery

setPage() 공개 메소드

public setPage ( integer $page ) : SearchQuery
$page integer
리턴 SearchQuery

toArray() 공개 메소드

Get the query as an array.
public toArray ( ) : array
리턴 array

withDateRestriction() 공개 메소드

Set a date restriction.
public withDateRestriction ( string $dateFieldName, string $operation, DateTime $date )
$dateFieldName string
$operation string
$date DateTime

withFacet() 공개 메소드

Set a facet.
public withFacet ( string $name, string $value )
$name string
$value string

withNumericFilter() 공개 메소드

Set a numeric filter.
public withNumericFilter ( string $name, string | array $values, string $logicalOperator = 'and' )
$name string
$values string | array
$logicalOperator string

프로퍼티 상세

$aroundRadius 보호되어 있는 프로퍼티

protected int $aroundRadius
리턴 integer

$dateRestrictions 보호되어 있는 프로퍼티

protected array $dateRestrictions
리턴 array

$facets 보호되어 있는 프로퍼티

protected array $facets
리턴 array

$hitsPerPage 보호되어 있는 프로퍼티

protected int $hitsPerPage
리턴 integer

$lat 보호되어 있는 프로퍼티

protected int $lat
리턴 integer

$lng 보호되어 있는 프로퍼티

protected int $lng
리턴 integer

$numericFilters 보호되어 있는 프로퍼티

protected array $numericFilters
리턴 array

$page 보호되어 있는 프로퍼티

protected int $page
리턴 integer

$query 보호되어 있는 프로퍼티

protected $query

$useLocationAwareSearch 보호되어 있는 프로퍼티

protected bool $useLocationAwareSearch
리턴 boolean