HasContentSimilarity
Table of Contents
Methods
- findContentSimilar() : Collection
- Advanced content similarity using PostgreSQL functions
- findSimilarByArtists() : Collection
- Find songs by similar artists or collaborating artists
- findSimilarByContent() : Collection
- Find songs with similar musical content (genre, artists, tempo, etc.)
- findSimilarByDuration() : Collection
- Find songs with similar duration (±20%)
- findSimilarByGenres() : Collection
- Find songs with similar genres using PostgreSQL function
Methods
findContentSimilar()
Advanced content similarity using PostgreSQL functions
public
static findContentSimilar([array<string|int, mixed> $genreIds = [] ][, array<string|int, mixed> $artistIds = [] ][, int|null $duration = null ][, int|null $year = null ][, int $limit = 50 ]) : Collection
Parameters
- $genreIds : array<string|int, mixed> = []
- $artistIds : array<string|int, mixed> = []
- $duration : int|null = null
- $year : int|null = null
- $limit : int = 50
Return values
CollectionfindSimilarByArtists()
Find songs by similar artists or collaborating artists
public
findSimilarByArtists([int $limit = 20 ]) : Collection
Parameters
- $limit : int = 20
Return values
CollectionfindSimilarByContent()
Find songs with similar musical content (genre, artists, tempo, etc.)
public
findSimilarByContent([int $limit = 10 ]) : Collection
Parameters
- $limit : int = 10
Return values
CollectionfindSimilarByDuration()
Find songs with similar duration (±20%)
public
findSimilarByDuration([int $limit = 20 ]) : Collection
Parameters
- $limit : int = 20
Return values
CollectionfindSimilarByGenres()
Find songs with similar genres using PostgreSQL function
public
findSimilarByGenres([int $limit = 20 ]) : Collection
Parameters
- $limit : int = 20