I have created a Computed Field to index a MultiList field type into Solr. By default, Solr defines a Case Sensitive search behavior over Multivalued/List type. Below is the example-

Solr indexed list is

  1. Searching with car_service_brands_sm:"kia", no records founds.
  2. Search with car_service_brands_sm:"Kia", records founds.

How can i make above search as "Case Insensitive" for MultiValued field type? Any help will be appreciated..thanks

  • Kuldeep can you include some of your SolrNet code for us to look at please? Jun 1 '18 at 11:14
  • Thanks Adam. Sorry, I didn't ask my question properly. For me, using SolrNet is the second thing to fetch the data from solr. Before that i trying to query the same using the solr interface iteself, which is also giving the same results as mentioned above. Jun 1 '18 at 13:52
  • Ok are you trying to do this from within a Sitecore published page that has the Sitecore context or are you doing this from an separate website or application? Also is the Index a custom one or a Sitecore index like the web one? Jun 1 '18 at 13:58
  • I am using sitecore and indexes are created into the solr. I have created a computed field for a MultiList type to index selected items values in Solr. Solr adds a postfix _sm for all the list type and index them. Now my search it working fine for all _t, _s postfixes for both lower & upper case. However, in case of _sm, It use the case sensitivity. Jun 2 '18 at 1:58

I suggest to search lowercase in solr’s schema file. You can see there what is normally applied in solr to make both indexing and search lowercase text.

Then you can apply the same configs to the field you want to be case insensitive.

Warning: I am not sure which part of sitecore is dealing with the specific field you are searching on and if the output of of those field values is used. If field value is read, then you could instead add a separate field that copies the original and lowercases it.

  • Thanks. I am using Solr 6.6.2. I didn't see any schema file in the solr directory. I found SolrConfig.xml which doesn't have "lowercase". Basically, my template has a multilist field. For indexing this into Solr, I have created a computed field to index the item's name because by default item's id are indexed. My search is based on multilist item name. In case of multivalued, solr does the case sensitive search. I want to make to case insensitive as i have explained in question above. Jun 5 '18 at 12:42
  • What about a managedschema file?
    – eglasius
    Jun 5 '18 at 12:51
  • @KuldeepSharma extra info to find the existing configuration: lucene.apache.org/solr/guide/6_6/…
    – eglasius
    Jun 5 '18 at 20:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.