@spree/docs 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -131,7 +131,7 @@ The `ProductPresenter` returns an array of documents. For a store with US (USD/E
131
131
 
132
132
  ## Step 4: Implement Bulk Reindex
133
133
 
134
- Use `ProductPresenter::REQUIRED_PRELOADS` to avoid N+1 queries:
134
+ Use `preload_associations_lazily` to avoid N+1 queries:
135
135
 
136
136
  ```ruby app/models/my_app/search_provider/typesense.rb
137
137
  def reindex(scope = nil)
@@ -139,9 +139,9 @@ def reindex(scope = nil)
139
139
  ensure_index_settings!
140
140
 
141
141
  scope.reorder(id: :asc)
142
- .preload(*Spree::SearchProvider::ProductPresenter::REQUIRED_PRELOADS)
142
+ .preload_associations_lazily
143
143
  .find_in_batches(batch_size: 500) do |batch|
144
- documents = batch.flat_map { |p| Spree::SearchProvider::ProductPresenter.new(p, store).call }
144
+ documents = batch.flat_map { |p| presenter_class.new(p, store).call }
145
145
  index_batch(documents)
146
146
  end
147
147
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spree/docs",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Spree Commerce developer documentation for AI agents and local reference",
5
5
  "type": "module",
6
6
  "license": "CC-BY-4.0",