Developer forum

Forum » Ecommerce - Standard features » Query products by dimension minimum and maximum values

Query products by dimension minimum and maximum values

Bjarne Rosendal
Bjarne Rosendal
Reply

We have the following imported product data with dimensions that we want to query: https://www.screencast.com/t/yrs8temEU

So the 2 custom fields for dimensions are added to the product index. When using Luke I can see that data is available: 

https://www.screencast.com/t/RJ0Yfwrjw and https://www.screencast.com/t/BkD2SB2YhKX

But when I try to setup a new query parameter like "dimensionminimum2" and a matching expression like this:

<BinaryExpression Operator="GreaterThan">
  <Left>
    <FieldExpression Field="CustomField_DimensionMinimum2" />
  </Left>
  <Right>
      <ParameterExpression Name="dimensionminimum2" />
  </Right>
</BinaryExpression>
 
I simply do not get any results, even though I know there are products with a minimum dimension higher than the submitted value in the "dimensionminimum2" parameter.
 
Can anyone explain what I could be doing wrong?

Replies

 
Bjarne Rosendal
Bjarne Rosendal
Reply

Okay, so the problem was simply that I needed to change the field type of the custom field to Integer to have the values indexed correctly :)

 

You must be logged in to post in the forum