Skip to content

Commit 2cafaec

Browse files
committed
fix: blank author name for ES index
1 parent 2f469fc commit 2cafaec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/models/author_field_type.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ def field_item_as_indexed_json_for_field_type(field_item, options = {})
1616
end
1717

1818
def mapping
19-
{author_name: mapping_field_name, type: :string, analyzer: :snowball}
19+
{ name: mapping_field_name, type: :string, analyzer: :snowball }
2020
end
2121

2222
private
2323

2424
def mapping_field_name
25-
"#{field_name.parameterize('_')}_author_name"
25+
"#{field_name.parameterize('_')}_author"
2626
end
2727

2828
def author_name_present

0 commit comments

Comments
 (0)