Skip to Content
0
Dec 11, 2019 at 02:29 PM

Custom QualifierProvider with Adaptive Search gives NPE

79 Views Last edit Dec 11, 2019 at 02:31 PM 3 rev

We have build a custom QualifierProvider, but when using adaptive search it gives a NullPointerException when the 'toFieldQualifier' method is called. this is because the value we use is always present on the session when using the storefront, but is never set when working with Adaptive search.

Our current solution is to make the value fallback in the QualifierProvider itself when it's not present in on the session because it doesn't matter what value is used for Adaptive search.

I'm not satisfied with making a required value, optional directly in the QualifierProvider. Is there any other way to set a default value on the session only when Adaptive search is used?