search.rb 536 B

1234567891011121314151617181920212223242526272829
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class CoreWorkflow
  3. module Search
  4. extend ActiveSupport::Concern
  5. include CanSearch
  6. included do
  7. scope :search_sql_extension, lambda { |_params|
  8. all.changeable
  9. }
  10. end
  11. class_methods do
  12. def search_query_extension(_params)
  13. {
  14. bool: {
  15. must: [
  16. {
  17. term: { 'changeable' => true }
  18. },
  19. ],
  20. }
  21. }
  22. end
  23. end
  24. end
  25. end