on ‎2021 May 17 3:40 PM
In the code filter query is used to get the desired result. I wanted to add the few more condition but unable to do so as Hybris code is replacing space with +.
Existing code is something like below where target is "SolrQuery":
target.addFilterQuery((START.concat("boxCountValue_int_mv:").concat("[")
.concat("22").concat(" TO ").concat("24").concat("]"))
.concat(OR).concat(getLocalizedPackType().concat(END));
Translated query is:
fq=(boxCountValue_int_mv:[22+TO+24]+OR+PackageType_en_string_mv:Bagged+OR+PackageType_en_string_mv:BaggedGround+OR+PackageType_en_string_mv:Bagged+– +Ground)
SOLR Indexed values in PackageType is "Bagged" or "BaggedGround" or "Bagged - Ground".
In last value i.e. "Bagged - Ground" there is space before and after hyphen(-).
Products with this value "Bagged - Ground" are not coming in result.
Looks like issue is that SPACE is not getting considered in query.
In SOLR dashboard, fq=PackageType_en_string_mv:"Bagged – Ground" gives correct result.
What can I do in code?
I have tried passing value as "Bagged - Ground" or Bagged\ -\ Ground (used \ ). Nothing works.
Request clarification before answering.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.