This discussion is archived
7 Replies Latest reply: Dec 16, 2012 5:47 PM by Dan at Branchbird RSS

Ranges for dimension

965342 Newbie
Currently Being Moderated

I have a requirement to create ranges for a Dimension weight.

The weight attribute holds the dimension values with measurement as mg,kg,ml(ex: 100mg,1kg,100ml).

I have created Schema.csv for ranges as
For mg 10 mg - 100mg, 100mg - 250 mg
For ml 10 ml - 50ml, 50ml - 100ml etc
For Kg 1 kg - 5 kg, 5kg-10kg

When i select the refinement( 10 mg-100mg) i am getting the records of 10ml - 100ml also.

Please suggest me is there any way to create ranges for the above requirement.

Thanks in advance


Edited by: 962339 on 24 Nov, 2012 9:46 AM

Edited by: 962339 on 24 Nov, 2012 9:48 AM
  • 1. Re: Ranges for dimension
    TimK Explorer
    Currently Being Moderated
    Hi Anil,
    This sounds like a common data architecture problem and I can imagine several different ways you might have implemented it and a couple possible solutions. I think the best approach is if you could share more about the format of schema.csv. Include a snippet of the header and a couple of obfuscated records (ie. change any data that is customer identity or information sensitive).
    The, you might share if you have any other data sources you are joining that are salient to the records in schema.csv. For example, left joining catalog.csv with schema.csv on schema_id. This might help identify if you are joining on an inadequate key or other relationship that produces inappropriate records - ie. records with too many size attributes.
  • 2. Re: Ranges for dimension
    Dan at Branchbird Journeyer
    Currently Being Moderated
    Are you mapping one source attribute into 3 Endeca size dimensions or are you mapping 3 source attributes into 3 Endeca size dimensions?

  • 3. Re: Ranges for dimension
    965342 Newbie
    Currently Being Moderated
    Thanks for reply Tim.
    Here is the schema.csv format.
    dimval.dimension_spec dimval.spec dimval.display_name dimval.parent_spec dimval.match_type dimval.display_order     dimval.classify_synonym     dimval.search_synonym dimval.range.comparison_type dimval.range.lower_bound dimval.range.lower_bound_inclusive dimval.range.upper_bound     dimval.range.upper_bound_inclusive dimval.prop.currency
    Weight     0.5g - 1g     0.5g - 1g     Weight     range     1               decimal     0.5     TRUE     1     FALSE
    Weight     1g- 2g     1g- 2g     Weight     range     2               decimal     1     TRUE     2     FALSE
    Weight     2g - 4g     2g - 4g     Weight     range     3               decimal     2     TRUE     4     FALSE
    Weight     Over 4g     Over 4g     Weight     range     4               decimal     4     TRUE          FALSE
    Weight     0.5ml – 0.5ml     0.5ml - 1ml     Size     range     1               decimal     0.5     TRUE     1     FALSE
    Weight     1ml - 2ml     1ml - 2ml     Weight     range     2               decimal     1     TRUE     2     FALSE
    Weight     2ml - 4ml     2ml - 4ml     Weight     range     3               decimal     2     TRUE     4     FALSE
    Weight     Over 4ml     Over 4ml     Weight     range     4               decimal     4     TRUE          FALSE

    Edited by: 962339 on Nov 26, 2012 1:31 AM
  • 4. Re: Ranges for dimension
    965342 Newbie
    Currently Being Moderated
    Hi Dan,

    I am mapping one source attribute to 3 endeca size dimensions.

    Anil Unnam
  • 5. Re: Ranges for dimension
    Dan at Branchbird Journeyer
    Currently Being Moderated

    I think your best bet is to add a record manipulator to break your 1 source attribute "Weight" into 3 source attributes, "Weight-ml", "Weight-mg", "Weight-kg". Then in your property mapper component, you can map each of these 3 source attributes to the appropriate Endeca dimension for each. This will solve the erroneous double-tagging you're experiencing today.

    The solution is straightforward. The challenge lies in the sometimes less-than-intuitive XML-based logic of the record manipulator. The manipulator should do the following:

    1) For each incoming record, check if the Weight coming in is kg, mg, or ml.
    2) Create a source attribute (aka. source property) that gets added to the record depending on what type of weight (e.g. Create "Weight-kg" with a value equal to the original source attribute "Weight"'s value.)

    Then in the property mapper, you can map the ml, mg, and kg Weight source properties to the Endeca ml, mg, and kg dimensions.

    Check out the VOID IF and VOID CREATE functions from the manipulator syntax guide here:

  • 6. Re: Ranges for dimension
    965342 Newbie
    Currently Being Moderated
    Hi Dan,

    As per Documentation

    About range filters
    Range filter functionality allows a user, at request time, to specify an arbitrary, dynamic range of values
    that are then used to limit the records returned for a navigation query.
    The remaining refinement dimension values for the records in the result set are also returned. For
    example, a range filter would be used if a user were querying for wines within a price range, say
    between $10 and $20.
    It is important to remember that, similar to record search, range filters are simply modifiers for a
    navigation query. The range filter acts in the same manner as a dimension value, even though it is
    not a specific system-defined dimension value.
    You can use a range filter in a query on record properties and on dimensions.
    Configuring properties and dimensions for range filtering
    Using range filters does not require Dgidx or Dgraph configuration flags.
    Range filters can be applied to either properties or dimensions of the following types:
    *• Properties of type Numeric (Integer, Floating point, DateTime) or type Geocode*
    *• Dimensions of type Numeric that contain only Integer or Floating point values.*

    So is i have created ranges for string property with values( 440 mg/1kg/440ml), so it is tagging the records in both 440 mg and 440 ml range. is there any other way to get this done.

    Thanks in advance.
  • 7. Re: Ranges for dimension
    Dan at Branchbird Journeyer
    Currently Being Moderated

    Can you please be more specific detailing the range value you created? You state that you "have created ranges for string property with values( 440 mg/1kg/440ml)", but I am not sure I understand how that is a range value. What are the low and high ends of the ranges you've created? Per my earlier post, I am suggesting that you create a different range dimension for milligrams, kilograms, and milliliters.

    Please advise,



  • Correct Answers - 10 points
  • Helpful Answers - 5 points