valkyrie icon indicating copy to clipboard operation
valkyrie copied to clipboard

Add scope to custom solr indexers

Open tpendragon opened this issue 7 years ago • 2 comments

You may want to change how you index based on what's already in the solr document.

tpendragon avatar Sep 12 '18 18:09 tpendragon

Doing this in a feature release will mean checking an indexer's initialize method to see if it accepts a scope.

tpendragon avatar Sep 12 '18 21:09 tpendragon

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.

tpendragon avatar Jun 27 '19 19:06 tpendragon