You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to create a tags index where the index is lowercased but the field is stored as is. Basically Twitter style where tags can be whatever case and appear in the case the author wrote them but querying is done entirely lowercased.
Currently NoBrainer complains if you do:
field :tags, type: Array
index :tags, lambda { |doc|
doc[:tags].map { |tag| tag.downcase }
}, multi: true
I'm a bit OCD here and would like the field/index name to be the same so I attempted to move the index directly into the field declaration but then I cannot specify it's a multi index.
Is this something that could be supported easily? Otherwise I can just suffice with custom index name :)
The text was updated successfully, but these errors were encountered:
Perhaps it would be a good idea to not have to specify a name and let nobrainer pick a default name (like simple and compound indexes).
In the meantime you can name it ltags ;)
I want to create a
tags
index where the index is lowercased but the field is stored as is. Basically Twitter style where tags can be whatever case and appear in the case the author wrote them but querying is done entirely lowercased.Currently NoBrainer complains if you do:
I'm a bit OCD here and would like the field/index name to be the same so I attempted to move the index directly into the field declaration but then I cannot specify it's a multi index.
Is this something that could be supported easily? Otherwise I can just suffice with custom index name :)
The text was updated successfully, but these errors were encountered: