Developer forum

Forum » CMS - Standard features » Repository CaseInsensitive

Repository CaseInsensitive

Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi,

 

I am running into some casing issues:

  • The data has camelCase and UpperCase values
    i.e. "Biotin" VS "BIOTIN"
  • The UI (backend's product card) selects the proper value for both values
    (in the screencast I don't show the product category field/value, but they are associated with "Biotin")
  • The Repository indexes them as different values, despite setting CaseInsensitivy as an Analyzer

 

Despite the fact that the data should be consistent, I would expect the repository to interpret both values as a single one. Is my assumption accurate? If not, is there anything I can do to get this working (without changing the data)?

 

Best Regards,

Nuno Aguiar


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Field is analyzed?

You also forgot the screencast.

Votes for this answer: 1
 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Nicolai,

 

 

I clicked on the top 2 checkboxes for Analyzed and Indexed (without reading the label), but now looks like the top 2 are "Stored" and "Indexed". I wonder if those switched positions at some point, or my mind is playing tricks on my.

 

Nonetheless I will test it and get back to you if it fails. Currently it's not working but for another reason... Even the simplest steps with this project become a daunting task.

 

Best Regards,

Nuno

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Nicolai,

 

I guess I replied too soon. The solution is running the index now, but I have a new issue. When the values are case insensitive, the facets options no longer render the correct label.

https://www.screencast.com/t/lgYHybImOIU

 

CSS is making them render capitalized, but you can see there are no spaces and trademark characters. Is this the expected behavior?

 

Best Regards,

Nuno Aguiar

 
Nicolai Pedersen
Reply

Yes, that is how Lucene works.

If you analyze it, the phrases will be split into terms.

You can maybe use an unanlyzed version of the field for the facets and an anlyzed version of the field for searching. But that will still give you 2 options in the facets and a wrong counter.

So best option is to Make sure your data is good - run a update field set field = "Whatever" where field = "Whatever". Would normalize capitalisation.

Br Nicolai

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Nicolai,

 

Right, it's case sensitive when matching the labels. I already talked to the customer and we're going to fix the data (match all values to match NAV) so there's no more issues.

 

Thank you,

Nuno Aguiar

 

You must be logged in to post in the forum