-
Notifications
You must be signed in to change notification settings - Fork 6
/
product.xml
66 lines (66 loc) · 2.66 KB
/
product.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?xml version="1.0"?>
<tryton>
<data>
<record model="ir.ui.view" id="attribute_view_list">
<field name="model">product.attribute</field>
<field name="inherit" ref="product_attribute_strict.attribute_view_list" />
<field name="name">attribute_list</field>
</record>
<record model="ir.ui.view" id="attribute_view_form">
<field name="model">product.attribute</field>
<field name="inherit" ref="product_attribute_strict.attribute_view_form" />
<field name="name">attribute_form</field>
</record>
<!-- Create a document for mapping products -->
<record model="elasticsearch.document.type" id="es_product_document">
<field name="name">Products</field>
<field name="model" search="[('model', '=', 'product.product')]"/>
<field name="mapping">
{
"dynamic_templates": [
{
"string_template": {
"path_match": "attributes.*",
"match_mapping_type": "string",
"mapping": {
"type": "string",
"index": "not_analyzed"
}
}
}
],
"properties": {
"code": {
"type": "string",
"analyzer": "simple"
},
"name": {
"fields": {
"metaphone": {
"type": "string",
"analyzer": "name_metaphone"
},
"partial": {
"search_analyzer": "full_name",
"index_analyzer": "partial_name",
"type": "string"
}
},
"type": "string",
"analyzer": "full_name"
},
"tree_nodes":
{
"type": "nested",
"properties": {
"id": {"type": "long"},
"name": {"type": "string"},
"sequence": {"type": "long"}
}
}
}
}
</field>
</record>
</data>
</tryton>