Allow "from" option inside index to be a lambda #111

Merged
merged 1 commit into from Jun 12, 2013

Projects

None yet

2 participants

@tilsammans

This allows users to populate the index at runtime. This way,
when you are using custom field names they don't need to be
present inside the model, but can be defined just for the
index.

I consider this pull request to be a work in progress since it
is missing specs. I just could not get the specs to work for
the server (see #110). This change does however work for
me when I use the gem locally.

Also I don't know yet where you want me to write documentation
for this beside the web source. Also glad to hear if anything
should be done differently.

@tilsammans tilsammans Allow +from+ option inside index to be a lambda
This allows users to populate the index at runtime. This way,
when you are using custom field names they don't need to be
present inside the model, but can be defined just for the
index.

Missing: specs!
10f18d3
@floere
Owner

This is great, thanks Joost, I like your work!
The web source is perfectly fine.

One problem with this pull request is that it does not work for the replace_from method anymore (line 36). Thus, this change breaks part of the interface. Same in parallel.rb, line 68 – however, that is much easier to solve, essentially as you did it in category_realtime.rb.

I am bent on including this, however, but we/I need to solve/think about the consequences a bit.

@tilsammans

Good. I will work on this pull request some more. I hope you don't mind keeping it open for a while.

@floere
Owner

Not at all!

@floere
Owner

Any updates? If not I'd go ahead and pull it in :)

@tilsammans

I told you it would be a while :)
Taking care of my children today and tomorrow is a national holiday.
If you want to integrate this one (and make it better) feel free!

@floere
Owner

:D
You did indeed! No worries – I'll just keep it open. Will let you know if I get too trigger happy. Enjoy your holiday 😎

@floere
Owner

Ok, getting trigger happy – any updates? :)

@tilsammans

Sadly I am going to have to close this one, I have not been able to improve this PR before my holidays.

As I won't be back until July I would rather close this issue than keep it open all that time. Sorry! :-(

@tilsammans tilsammans closed this Jun 12, 2013
@floere
Owner

No worries. I might still pull it so your contribution is noted in Github :)

@tilsammans
@floere
Owner

👍

@floere floere reopened this Jun 12, 2013
@floere floere merged commit ba953f5 into floere:master Jun 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment