Why use the Elastic Data model?
With the Elastic Data model you can define additional
attributes and facets on Parts without actually modifying the Data model.
Therefore, there is no need for the
OnePart Customization SDK.
The part’s additional attributes and facets automatically
appear on its preview, table and compare pages, and also in the left filtering
panel of the results list, either as filtering facets, or as advanced search
input fields. These attributes can be text, dates (with time), or numeric (with
or without physical unit). You can even have several classes of Parts, each
with its distinct set of attributes and facets; in this case, the specific
input fields and facets are displayed when the result list is composed of a
single class of Parts. For example, length and diameter for screws, and maximum
voltage for electronic components.
When to use the Elastic Data model?
Context:
In the design universe, there are often two different kind of parts:
-
Parts that are designed for a specific purpose and are
"not-standardized"
-
"Catalog Parts" that can be standardized and are often reused in
lots of places (such as bolts, screws, and most electronic components like
capacitors and resistors)
OnePart already handles the first kind by default. The second kind
requires an Elastic Data model to specialize the search and display data. In
addition to the "catalog" use case, the Elastic Data model is relevant anywhere
specific custom fields and facets are required; often when standard Data model
is enriched by data coming from an external system (such as ERP or a PLM) or
when parts must carry company or business-specific information.
How to use the Elastic Data model?
Each "family" of parts in a catalog has a certain number of specific attributes. Each attribute is defined in the
ONEPART_INSTALLDIR\datadir\config\elasticDataModel.csv
file by:
Before you begin:
- Optional: A family
identifier that can be hierarchical pushed in
catalog meta.
- For example,
Battery Products/Batteries Non-Rechargeable (Primary) - When missing, the attribute will match all
documents.
- A meta name. For example,
voltage_rated
- A data type. Possible values:
Alphanum ,
Decimal ,
Date
- A display type. Possible values:
Context:
Value
|
Result
|
Comments
|
Display
|
The meta is displayed on the preview, table and compare
pages.
|
|
Facet
|
The meta is displayed on the preview, table and compare
pages. A facet is shown in the Filters panel.
|
You can map the same meta twice; once as a Facet, once as
a Search field.
|
Search
|
The meta is displayed on preview, table and compare pages.
A search field is shown in the Filters panel.
|
- Optional - A prefix handler. Such as
price for the erp_price meta so the user can use search phrase
like: price>10
- Optional for
Alphanum metas: Full-text search ability when "x" is used as a value.
- A facet category
(mandatory for
Facet values, optional for Search values) defines where the field is
displayed in the Filters panel. By default, the field displays in More... at the end of the filters panel.
Possible values:
when ,
who ,
what ,
where ,
why ,
how .
- Optional for
Decimal metas - A unit. The values pushed must use
the default unit. Possible values below:
Note:
Values parameters are optional. To use default values, just
use the value, ex: mass . To override default parameters, don't use
quotes or spaces, ex: price(4)
Value
|
Parameters
|
Units
|
Expected unit
|
Min absolute displayed value
|
Max absolute displayed value
|
Comment
|
time
|
Max fraction digit. Default: 2
|
ns, µs, ms, s, m, h, d
|
h
|
1ns
|
106751d 23h 47m 16s 854ms 776µs 382ns
|
|
length
|
Max fraction digit. Default: 2
|
in, ft, mi OR
nm, µm, mm, m, km
|
m
|
1 nm
|
9 223 372,04 km
|
|
area
|
Max fraction digit. Default: 2
|
in², ft²
OR
mm², cm², dm², m²
|
m²
|
0.001 mm²
|
9 223 372 036,85 m²
|
|
mass
|
Max fraction digit. Default: 2
|
grain, oz, lb, sh.tn, ton
OR
µg, mg, g, kg, t
|
kg
|
1 µg
|
9 223 372,04 t
|
|
volume
|
Max fraction digit. Default: 2
|
cu. in, gal GB, cu. ft
OR
mm³, cm³, dm³, m³
|
m³
|
1 mm³
|
9 223 372 036,85 m³
|
|
filesize
|
Max fraction digit. Default: 2
|
Bytes, kB, MB, GB, TB
|
Byte
|
1 Byte
|
8 388 608 TB
|
|
frequency
|
Max fraction digit. Default: 2
|
mHz, Hz, kHz, MHz, GHz, THz
|
Hz
|
1 mHz
|
9 223,37 THz
|
|
voltage
|
Max fraction digit. Default: 2
|
μV, mV, V, kV, MV
|
V
|
0.001 μV
|
9 223,37 MV
|
|
electricalcurrent
|
Max fraction digit. Default: 2 |
fA, pA, nA, μA, mA, A, kA, MA
|
A
|
1 pA
|
9,22 MA
|
|
electricalresistance
|
Max fraction digit. Default: 2 |
μΩ, mΩ, Ω, kΩ, MΩ, GΩ, TΩ
|
Ω
|
1 μΩ
|
9,22 TΩ
|
|
power
|
Max fraction digit. Default: 2 |
μW, mW, W, kW, MW, GW
|
W
|
0,001 μW
|
9,22 GW
|
|
capacitance
|
Max fraction digit. Default: 2
|
pF, nF, µF, mF, F
|
F
|
0,001 pF
|
9 223,37 F
|
|
price |
- Max fraction
digit. Default: 2
- Currency char.
Default: €
- Symbol
position. Possible values are: "after"(default), "before"
|
_UNIT_, k_UNIT_
|
_UNIT_
|
0,000000001 _UNIT_
|
9 223 372,04 k _UNIT_
|
Examples:
- price(2)
- for €: price(2,€)
- for USD: price(2,USD,before)
Note:
Parameter order is important. You can't skip max
fraction digit and currency if you want to set the
position.
|
generic
|
- Max fraction
digit. Default: 2
- Symbol char.
Default: NONE
- Symbol
position. Possible values are: "after"(default), "before"
|
_UNIT_
|
_UNIT_
|
0,000000001 _UNIT_
|
9 223 372 036,85 _UNIT_
|
Examples:
- for Decibel:
generic (1,dB) for Temperature:generic (2, C)
|
- Optional for
Facet metas: Extra Search API (SAPI) parameters as
a query string (param1=value1¶m2=value2 ...). The
details of each parameter can be in
Exalead CloudView documentation. Possible values:
- For
any kind of facet:
min_docs, max_elements, sort, sort_agg_fun,
explicit_sort_order_values, refinement_policy
- For
Alphanum
facets:
max_depth, max_depth_from_root, max_per_level
- For
Decimal
facets:
type, min, max, lsb, msb, default_precision
- When
type=
num_explicit range
- When
type=
num_fixed rsize, below_min, above_max, fmt_range, fmt_above,
fmt_below, fmt_single
- When
type=
num_dynamic (default)
fmt_range, nb_ranges, policy,
mrsize, exclusiveRightBracket -
For range facets with small values, you must use the
Extra SAPI params column in the
configuration. For values such as:
mrsize=0&default_precision=4 , it will
reset the minimum size of a range to 0 (defaults to 1, not relevant for value
like 1mm = 0.001m) and set the precision to 10-4 (defaults to 10-2, not
relevant for values like 1mm = 0.001m).
To implement the catalog mapping file
-
Complete the
ONEPART_INSTALLDIR\datadir\config\elasticDataModel.csv
file.
The following header line in the file must not be removed.
"Catalog class","Meta name","Data type","Display type","Prefix
handler","Full-text search","Facet category","Unit","Extra SAPI params"
-
Run
ONEPART_INSTALLDIR\datadir\bin\buildgct.exe
-
Restart your product to apply the configuration.
You can now push
your documents. A document processor will catch the meta to be mapped and push
them into the dynamic properties
edm_TYPE_X .
|