Skip to content

Commit

Permalink
feat(Algolia): use index suffix to change index names
Browse files Browse the repository at this point in the history
  • Loading branch information
thecristen committed Nov 9, 2023
1 parent 7efe83e commit 940b84c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/algolia/lib/algolia/routes.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defmodule Algolia.Routes do
end

@impl Algolia.Index
def index_name, do: "routes"
def index_name, do: "routes" <> Application.get_env(:algolia, :index_suffix, "")

@spec get_stop_names(Routes.Route.t()) :: [String.t()]
def get_stop_names(route) do
Expand Down
2 changes: 1 addition & 1 deletion apps/algolia/lib/algolia/stops.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defmodule Algolia.Stops do
end

@impl Algolia.Index
def index_name, do: "stops"
def index_name, do: "stops" <> Application.get_env(:algolia, :index_suffix, "")

def by_route(route_id), do: @repo.by_route({route_id, 0, []})
end

0 comments on commit 940b84c

Please sign in to comment.