I have a custom field to be Indexed for each Item. If it does not get the value it returns string.Empty
.
Before when Item's searched in Solr, whose custom fields are string.empty the field was not present in the item. But recently after Indexing for an item, the custom field with empty string is coming in the Solr.
So suppose my custom field name is custom_fac_s
. earlier when Solr is queried like: custom_fac_s: ""
, it did not return any item, but recently it does.
Is there a change in Solr Behaviour?
I am using Sitecore 9.
The field is mapped in Sitecore.ContentSearch.SolrProvider.SolrIndexConfiguration.config
as below:
<field fieldName="Custom_Fac" storageType="yes" returntype="string" indexType="untokenized">extensions.Search.AddCustomFacetIndexField,extensions</field>
nullValue="NULLVALUE" emptyString="EMPTYVALUE"
parameters in config. Also try to run your query against the Solr directly.custom_fac_s
will not be present for the items in Solr. However, returningstring.Empty
will have make the field present in the documents.