4

In the tire gem's README, I see they propose two ways to import a model:

rake environment tire:import CLASS='Article'
rake environment tire:import CLASS='Article' FORCE=true

I can appreciate that the FORCE=true will delete the index before reindexing, but what is the benefit in doing so?

Taryn East
  • 27,486
  • 9
  • 86
  • 108
zilla
  • 909
  • 1
  • 11
  • 17

1 Answers1

4

Deleting and recreating the index from scratch is useful mainly when you change the model mapping during development.

karmi
  • 14,059
  • 3
  • 33
  • 41
  • 1
    So if you don't set FORCE=1 and you change the mapping, then what happens if you reimport the model? – zilla Mar 05 '13 at 23:51
  • 1
    The new mapping isn't applied. You have to manually update it with `Mymodel.index.mapping({... new mapping...})`. – karmi Mar 06 '13 at 09:59