Package org.localify.search
Class PostgresSearchService
java.lang.Object
org.localify.search.PostgresSearchService
- All Implemented Interfaces:
SearchService
A search service that uses PostgreSQL for searching.
-
Constructor Summary
ConstructorsConstructorDescriptionPostgresSearchService(VenueRepository venueRepository, EventRepository eventRepository, ArtistRepository artistRepository, CityRepository cityRepository, SpotifyService spotifyService, PlaylistService playlistService, LocalifyProperties properties, CityService cityService, VenueService venueService, AppleGeocoding appleGeocoding, PointUtil pointUtil, GoogleDispatch googleDispatch, FestivalRepository festivalRepository) Constructs a new PostgresSearchService. -
Method Summary
Modifier and TypeMethodDescriptionsearchAll(SpotifySearchQuery request) Searches for all types of entities.searchArtists(SearchQuery request, boolean autoSearchSpotify) Searches for artists using a search query.searchCities(SearchQuery request) Searches cities using a query.searchEvents(SearchQuery request) Searches for events using a search query.searchFestivals(SearchQuery request) Searches for festivals using a search query.searchVenues(SearchQuery request) Searches for venues using a search query.
-
Constructor Details
-
PostgresSearchService
public PostgresSearchService(VenueRepository venueRepository, EventRepository eventRepository, ArtistRepository artistRepository, CityRepository cityRepository, SpotifyService spotifyService, PlaylistService playlistService, LocalifyProperties properties, CityService cityService, VenueService venueService, AppleGeocoding appleGeocoding, PointUtil pointUtil, GoogleDispatch googleDispatch, FestivalRepository festivalRepository) Constructs a new PostgresSearchService.- Parameters:
venueRepository- The venue repository.eventRepository- The event repository.artistRepository- The artist repository.cityRepository- The city repository.spotifyService- The Spotify service.playlistService- The playlist service.properties- The application properties.cityService- The city service.venueService- The venue service.appleGeocoding- The Apple geocoding service.pointUtil- The point utility.googleDispatch- The Google dispatch service.festivalRepository- The festival repository.
-
-
Method Details
-
searchArtists
@Transactional public List<BasicArtistResponse> searchArtists(SearchQuery request, boolean autoSearchSpotify) Description copied from interface:SearchServiceSearches for artists using a search query.- Specified by:
searchArtistsin interfaceSearchService- Parameters:
request- the search request dtoautoSearchSpotify- whether to automatically search Spotify if no results are found- Returns:
- list of artist responses - can be empty. Never null.
-
searchCities
Description copied from interface:SearchServiceSearches cities using a query.- Specified by:
searchCitiesin interfaceSearchService- Parameters:
request- the search query dto- Returns:
- list of city responses - can be empty. Never null.
-
searchVenues
Description copied from interface:SearchServiceSearches for venues using a search query.- Specified by:
searchVenuesin interfaceSearchService- Parameters:
request- the search request dto- Returns:
- list of venue responses - can be empty. Never null.
-
searchEvents
Description copied from interface:SearchServiceSearches for events using a search query.- Specified by:
searchEventsin interfaceSearchService- Parameters:
request- the search request dto- Returns:
- list of event responses - can be empty. Never null.
-
searchFestivals
Description copied from interface:SearchServiceSearches for festivals using a search query.- Specified by:
searchFestivalsin interfaceSearchService- Parameters:
request- the search request dto- Returns:
- list of festival responses - can be empty. Never null.
-
searchAll
Searches for all types of entities.- Specified by:
searchAllin interfaceSearchService- Parameters:
request- The search query.- Returns:
- A response containing lists of all found entities.
-