valkyrie
valkyrie copied to clipboard
Add scope to custom solr indexers
You may want to change how you index based on what's already in the solr document.
Doing this in a feature release will mean checking an indexer's initialize method to see if it accepts a scope.
This will change the indexer signature from
def initialize(resource:)
end
def to_solr
end
to
def initialize(resource:, index_hash:)
end
def to_solr
end
We'll have to change CompositeIndexer so that it passes the output of to_solr to each subsequent indexer if possible.