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 have noticed that when declaring multiple fields with the same name in a searchable block, the last one wins, even when the dynamic field naming conventions would prevent an actual collision in Solr.
This is what I observe:
# does not get indexed
string :century, multiple: true
# gets indexed as "century_s"
string :century, multiple: false do
attributes[:century].join(', ')
end
What I would prefer is:
# gets indexed as "century_sm"
string :century, multiple: true
# gets indexed as "century_s"
string :century, multiple: false do
attributes[:century].join(', ')
end
In my application I need to index the same fields in different ways to support faceting and sorting, etc. The Sunspot dynamic field naming conventions are convenient for this, but this behavior was unexpected.
Right now I am working around this by changing the name, but it feels a bit redundant since the dynamic field names already capture the distinctions I set up.
The text was updated successfully, but these errors were encountered:
I have noticed that when declaring multiple fields with the same name in a
searchable
block, the last one wins, even when the dynamic field naming conventions would prevent an actual collision in Solr.This is what I observe:
What I would prefer is:
In my application I need to index the same fields in different ways to support faceting and sorting, etc. The Sunspot dynamic field naming conventions are convenient for this, but this behavior was unexpected.
Right now I am working around this by changing the name, but it feels a bit redundant since the dynamic field names already capture the distinctions I set up.
The text was updated successfully, but these errors were encountered: