Skip to content

Commit

Permalink
Uncomment and reorder embedding fields in search config
Browse files Browse the repository at this point in the history
  • Loading branch information
bmquinn committed Aug 16, 2024
1 parent 322596b commit ae95905
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
34 changes: 17 additions & 17 deletions app/config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -84,25 +84,25 @@ config :meadow, Meadow.Search.Cluster,
aws_secret("meadow", dig: ["search", "embedding_dimensions"], default: nil),
embedding_text_fields: [
:title,
:alternate_title,
:description,
:collection,
# :alternate_title,
# :caption,
# :table_of_contents,
# :abstract,
# :contributor,
# :creator,
# :date_created,
# :genre,
# :subject,
# :style_period,
# :language,
# :location,
# :publisher,
# :scope_and_contents,
# :technique,
# :physical_description_material,
# :physical_description_size,
:creator,
:contributor,
:date_created,
:genre,
:subject,
:style_period,
:language,
:location,
:publisher,
:technique,
:physical_description_material,
:physical_description_size,
:caption,
:table_of_contents,
:scope_and_contents,
:abstract,
]

config :meadow,
Expand Down
2 changes: 1 addition & 1 deletion app/lib/meadow/indexing/v2/work.ex
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ defmodule Meadow.Indexing.V2.Work do
|> Enum.join("\n")

Map.put(map, :embedding_text_length, String.length(value))
|> Map.put(:embedding_text, String.slice(value, 0, 2048))
|> Map.put(:embedding_text, String.slice(value, 0, 2047))
end

defp prepare_embedding_value(%{label: v}), do: prepare_embedding_value(v)
Expand Down

0 comments on commit ae95905

Please sign in to comment.