Open alranel opened 5 years ago
page.name is currently used for populating the id field:
page.name
id
https://github.com/omc/searchyll/blob/e601fea641979982d12e8210aea6699434b31840/lib/searchyll.rb#L40-L44
However, there's no guarantee that name contains a defined value, and Elasticsearch will complain if it doesn't.
name
Why don't we use page.url instead, which is unique enough for being used as an ID (definitely more than name) and is guaranteed to be always defined?
page.url
page.name
is currently used for populating theid
field:https://github.com/omc/searchyll/blob/e601fea641979982d12e8210aea6699434b31840/lib/searchyll.rb#L40-L44
However, there's no guarantee that
name
contains a defined value, and Elasticsearch will complain if it doesn't.Why don't we use
page.url
instead, which is unique enough for being used as an ID (definitely more thanname
) and is guaranteed to be always defined?