lib/elasticsearch/model/multimodel.rb in elasticsearch-model-7.1.1 vs lib/elasticsearch/model/multimodel.rb in elasticsearch-model-7.1.2.pre
- old
+ new
@@ -83,10 +83,10 @@
# Get an Array of document types used for retrieving documents when doing a search across multiple models
#
# @return [Array] the list of document types used for retrieving documents
#
def document_type
- models.map { |m| m.document_type }
+ models.map { |m| m.document_type }.compact.presence
end
# Get the client common for all models
#
# @return Elasticsearch::Transport::Client