Skip to content

Instantly share code, notes, and snippets.

@jrochkind
Created February 11, 2015 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrochkind/22ee1b97a3cb581f9138 to your computer and use it in GitHub Desktop.
Save jrochkind/22ee1b97a3cb581f9138 to your computer and use it in GitHub Desktop.
Here's how you get the leader in traject
to_field "something" do |record, accumulator|
leader = record.leader
# The only reason you want the leader is becuase you are going to do
# SOMETHING with it, right? You're not just gonna index the leader, are ya?
output = do_something_to(leader)
accumulator << output
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment