retire
retire copied to clipboard
When manually defining index_name, index_prefix doesn't take effect
I have a model called Product, and the index is products_current, in test I want to use test_products_current.
This is not possible currently because if you don't define the name, the prefix is used with the default name.
A prefix should apply either way right?
Hmm, that is correct, but I think the current behaviour might actually be less surprising? When you define an index name, you clearly want the index named like this.
I mean, we can take index_prefix
into account in https://github.com/karmi/tire/blob/master/lib/tire/model/naming.rb#L34… Would like to hear some opinions on that.
/cc @vhyza
Maybe, I guess it depends on who you talk to.. I'd expect a prefix to be
applied to everything, especially seen as its primarily used for separating
environments.. regardless of wether you define the index_name manually or
let it be automatically generated, you'd still want it to be test_
Feedback from other users would be good!
On Fri, Sep 13, 2013 at 10:09 AM, Karel Minarik [email protected]:
Hmm, that is correct, but I think the current behaviour might actually be less surprising? When you define an index name, you clearly want the index named like this.
I mean, we can take index_prefix into account in https://github.com/karmi/tire/blob/master/lib/tire/model/naming.rb#L34…Would like to hear some opinions on that.
/cc @vhyza https://github.com/vhyza
— Reply to this email directly or view it on GitHubhttps://github.com/karmi/tire/issues/866#issuecomment-24382159 .
Michael
www.brightbits.co.uk
Company number: 08133555 Registered in England Registered office: 22 Finwell Road, Rainham, Kent, ME8 7PY
I tend to skip this, and just leave it to the user to combine everything in the index_name
method, and focus on the new client, instead of fixing this, what do you think?