I've upgraded from sc90 to sc92 and faced the following problem with field types in solr:
sc90:
sitecore field type: DropLink
solr doc: "accommodation_type_s":"6f75a5e4380448c7b95820e14b4bab12"
predicate.Or(i => i["accommodation_type_s"] == value)
=> solr query: accommodation_type_s:(6f75a5e4380448c7b95820e14b4bab12)
sc92
sitecore field type: DropLink
solr doc: "accommodation_type_sm":["6f75a5e4380448c7b95820e14b4bab12"]
predicate.Or(i => i["accommodation_type_sm"] == value)
=> solr query: ERROR Solr Error : ["undefined field accommodation_type"] - Query attempted: accommodation_type:(6f75a5e4380448c7b95820e14b4bab12)...
Looks like all single-link field types became list of guids instead of string guid in solr documents.
I can't use strongly typed objects to make query like i.AccommodationType.Contains(guid) or == guid
because all queries are dynamically built and I don't know what field will be used to make it.
I've seen suggestions from other similar issues here that recommend:
by patching the returnType to string
But the main problem for me is why does the query i["accommodation_type_sm"] == value
ignore the _sm
postfix and raise an error in the search logs?