redi_search 6.3.0 → 6.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/lib/redi_search/aggregate/clauses/apply.rb +24 -0
  4. data/lib/redi_search/aggregate/clauses/filter.rb +22 -0
  5. data/lib/redi_search/aggregate/clauses/group_by.rb +79 -0
  6. data/lib/redi_search/aggregate/clauses/limit.rb +28 -0
  7. data/lib/redi_search/aggregate/clauses/load.rb +22 -0
  8. data/lib/redi_search/aggregate/clauses/sort_by.rb +43 -0
  9. data/lib/redi_search/aggregate/clauses/verbatim.rb +17 -0
  10. data/lib/redi_search/aggregate/reducers/average.rb +26 -0
  11. data/lib/redi_search/aggregate/reducers/count.rb +23 -0
  12. data/lib/redi_search/aggregate/reducers/distinct_count.rb +26 -0
  13. data/lib/redi_search/aggregate/reducers/distinctish_count.rb +26 -0
  14. data/lib/redi_search/aggregate/reducers/max.rb +26 -0
  15. data/lib/redi_search/aggregate/reducers/min.rb +26 -0
  16. data/lib/redi_search/aggregate/reducers/quantile.rb +30 -0
  17. data/lib/redi_search/aggregate/reducers/stdev.rb +26 -0
  18. data/lib/redi_search/aggregate/reducers/sum.rb +26 -0
  19. data/lib/redi_search/aggregate/reducers/to_list.rb +26 -0
  20. data/lib/redi_search/aggregate.rb +104 -0
  21. data/lib/redi_search/application_clause.rb +37 -0
  22. data/lib/redi_search/client.rb +5 -4
  23. data/lib/redi_search/index.rb +4 -0
  24. data/lib/redi_search/log_subscriber.rb +4 -3
  25. data/lib/redi_search/model.rb +5 -1
  26. data/lib/redi_search/schema/tag_field.rb +8 -0
  27. data/lib/redi_search/search/clauses/highlight.rb +3 -1
  28. data/lib/redi_search/search/clauses/in_order.rb +2 -0
  29. data/lib/redi_search/search/clauses/language.rb +1 -0
  30. data/lib/redi_search/search/clauses/limit.rb +1 -0
  31. data/lib/redi_search/search/clauses/no_content.rb +2 -0
  32. data/lib/redi_search/search/clauses/no_stop_words.rb +2 -0
  33. data/lib/redi_search/search/clauses/return.rb +1 -0
  34. data/lib/redi_search/search/clauses/slop.rb +1 -0
  35. data/lib/redi_search/search/clauses/sort_by.rb +1 -0
  36. data/lib/redi_search/search/clauses/timeout.rb +24 -0
  37. data/lib/redi_search/search/clauses/verbatim.rb +2 -0
  38. data/lib/redi_search/search/clauses/with_payloads.rb +17 -0
  39. data/lib/redi_search/search/clauses/with_scores.rb +2 -0
  40. data/lib/redi_search/search/clauses/with_sort_keys.rb +17 -0
  41. data/lib/redi_search/search/clauses.rb +36 -55
  42. data/lib/redi_search/search/{clauses → queries}/and.rb +1 -1
  43. data/lib/redi_search/search/{clauses → queries}/boolean.rb +4 -4
  44. data/lib/redi_search/search/{clauses → queries}/or.rb +1 -1
  45. data/lib/redi_search/search/{clauses → queries}/where.rb +2 -2
  46. data/lib/redi_search/search/queries.rb +39 -0
  47. data/lib/redi_search/search.rb +7 -6
  48. data/lib/redi_search/version.rb +1 -1
  49. metadata +30 -8
  50. data/lib/redi_search/search/clauses/application_clause.rb +0 -31
@@ -1,31 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RediSearch
4
- class Search
5
- module Clauses
6
- class ApplicationClause
7
- include Validatable
8
-
9
- class << self
10
- def clause_term(term, **validations)
11
- attr_reader term
12
-
13
- validations.each do |validation_type, options|
14
- define_validation(term, validation_type, options)
15
- end
16
- end
17
-
18
- private
19
-
20
- def define_validation(term, type, options)
21
- if options.is_a? Hash
22
- public_send("validates_#{type}_of", term, **options)
23
- else
24
- public_send("validates_#{type}_of", term)
25
- end
26
- end
27
- end
28
- end
29
- end
30
- end
31
- end