Module: Chewy::Index::Compiled
- Extended by:
- ActiveSupport::Concern
- Included in:
- Chewy::Index
- Defined in:
- lib/chewy/index/compiled.rb
Overview
Compiled compose path. Default for all indexes.
Generates a single ‘chewy_compose` method per index from the field tree (no Ruby source parsing of user procs). Bakes the per-field arity into the call site and inlines hash construction, removing the per-field iteration + dispatch overhead of the legacy plain compose path. Proc bodies are NOT inlined — procs are called via `.call`. In exchange there are no parser/unparser/method_source deps and no Ruby/Prism version coupling.
‘fields:` selection is supported: a dedicated method is generated and memoized per unique fields set.
Falls back to the plain ‘Chewy::Fields::Root#compose` path when the field tree uses features the compiler does not handle: ignore_blank, geo_point, custom root value.
Defined Under Namespace
Modules: ClassMethods Classes: Compiler, UNSUPPORTED
Constant Summary collapse
- COMPILE_MUTEX =
Mutex.new