pgj commented on code in PR #4662:
URL: https://github.com/apache/couchdb/pull/4662#discussion_r1306466220
##########
src/mango/src/mango.hrl:
##########
@@ -41,3 +47,31 @@
-type row_property_key() :: id | key | value | doc.
-type row_properties() :: [{row_property_key(), any()}].
+
+-type reason() :: needs_text_search
+ | field_mismatch
+ | sort_order_mismatch
+ | empty_selector
+ | less_overlap
+ | too_many_fields
+ | alphabetically_comes_after
+ | is_partial
+ | scope_mismatch
+ | excluded_by_user
+ | unfavored_type.
+
+-type rejection_details() :: #{ reason => [reason()] }.
+
+-type trace() ::
+ #{
+ all_indexes := sets:set(#idx{}),
+ global_indexes := sets:set(#idx{}),
+ partition_indexes := sets:set(#idx{}),
+ usable_indexes := sets:set(#idx{}),
+ filtered_indexes := sets:set(#idx{}),
+ indexes_of_type := sets:set(#idx{}),
+ usability_map := [{#idx{}, {boolean(), rejection_details()}}],
+ sorted_index_ranges => [{#idx{}, [range()], integer()}]
Review Comment:
Yes, this is by [Section 7.2: Types and Their
Syntax](https://www.erlang.org/doc/reference_manual/typespec#types-and-their-syntax)
of the Erlang Reference Manual, User's Guide. It might be a new feature.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]