Version 0.1.19 0.1.19
authorThierry Florac <thierry.florac@onf.fr>
Fri, 28 Dec 2018 11:04:29 +0100
changeset 124 e7c1926fb3f8
parent 123 baa26ee96741
child 125 6d725a84f3ff
Version 0.1.19
buildout.cfg
docs/HISTORY.txt
docs/README.txt
setup.py
src/pyams_content_es.egg-info/PKG-INFO
src/pyams_content_es.egg-info/SOURCES.txt
--- a/buildout.cfg	Fri Dec 28 10:24:48 2018 +0100
+++ b/buildout.cfg	Fri Dec 28 11:04:29 2018 +0100
@@ -76,4 +76,4 @@
 eggs = pyams_content_es [test]
 
 [versions]
-pyams_content_es = 0.1.18
+pyams_content_es = 0.1.19
--- a/docs/HISTORY.txt	Fri Dec 28 10:24:48 2018 +0100
+++ b/docs/HISTORY.txt	Fri Dec 28 11:04:29 2018 +0100
@@ -1,6 +1,12 @@
 History
 =======
 
+0.1.19
+------
+ - added resource index info
+ - updated object modified event subscriber to allow indexation of several objects in the same transaction
+ - updated index mapping
+
 0.1.18
 ------
  - corrected relevance sorting
--- a/docs/README.txt	Fri Dec 28 10:24:48 2018 +0100
+++ b/docs/README.txt	Fri Dec 28 11:04:29 2018 +0100
@@ -40,3 +40,109 @@
     }
   }
 }
+
+
+PUT /onf_website/_mapping/PyAMS_document
+{
+  "properties": {
+    "resource_info": {
+      "type": "object",
+      "properties": {
+        "author": {
+          "type": "text"
+        },
+        "drawer": {
+          "type": "text"
+        },
+        "colourist": {
+          "type": "text"
+        },
+        "lettering": {
+          "type": "text"
+        },
+        "producer": {
+          "type": "text"
+        },
+        "director": {
+          "type": "text"
+        },
+        "actors": {
+          "type": "text"
+        },
+        "editor": {
+          "type": "text"
+        },
+        "collection": {
+          "type": "keyword"
+        },
+        "series": {
+          "type": "text"
+        },
+        "editor_reference": {
+          "type": "keyword"
+        },
+        "isbn_number": {
+          "type": "keyword"
+        },
+        "summary": {
+          "type": "object",
+          "properties": {
+            "en": {
+              "type": "text"
+            },
+            "fr": {
+              "type": "text",
+              "analyzer": "french",
+              "search_analyzer": "french_search"
+            }
+          }
+        },
+        "publisher_words": {
+          "type": "object",
+          "properties": {
+            "en": {
+              "type": "text"
+            },
+            "fr": {
+              "type": "text",
+              "analyzer": "french",
+              "search_analyzer": "french_search"
+            }
+          }
+        }
+      }
+    }
+  }
+}
+
+
+Update index mappings:
+======================
+
+PUT /onf_website_v2
+{... index_settings ...}
+
+POST /_reindex
+{
+    "source": {
+        "index": "onf_website-v1",
+        "size": 10
+    },
+    "dest": {
+        "index": "onf_website-v2",
+        "pipeline": "attachment"
+    }
+}
+
+DELETE /onf_website
+
+PUT /_aliases
+{
+    "actions": {
+        "add": {
+            "index": "onf_website-v2",
+            "alias": "onf_website"
+        }
+    }
+}
+
--- a/setup.py	Fri Dec 28 10:24:48 2018 +0100
+++ b/setup.py	Fri Dec 28 11:04:29 2018 +0100
@@ -22,7 +22,7 @@
 README = os.path.join(DOCS, 'README.txt')
 HISTORY = os.path.join(DOCS, 'HISTORY.txt')
 
-version = '0.1.18'
+version = '0.1.19'
 long_description = open(README).read() + '\n\n' + open(HISTORY).read()
 
 tests_require = []
--- a/src/pyams_content_es.egg-info/PKG-INFO	Fri Dec 28 10:24:48 2018 +0100
+++ b/src/pyams_content_es.egg-info/PKG-INFO	Fri Dec 28 11:04:29 2018 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pyams-content-es
-Version: 0.1.18
+Version: 0.1.19
 Summary: PyAMS content interfaces and classes for ElasticSearch indexation
 Home-page: http://hg.ztfy.org/pyams/pyams_content_es
 Author: Thierry Florac
@@ -50,9 +50,121 @@
         }
         
         
+        PUT /onf_website/_mapping/PyAMS_document
+        {
+          "properties": {
+            "resource_info": {
+              "type": "object",
+              "properties": {
+                "author": {
+                  "type": "text"
+                },
+                "drawer": {
+                  "type": "text"
+                },
+                "colourist": {
+                  "type": "text"
+                },
+                "lettering": {
+                  "type": "text"
+                },
+                "producer": {
+                  "type": "text"
+                },
+                "director": {
+                  "type": "text"
+                },
+                "actors": {
+                  "type": "text"
+                },
+                "editor": {
+                  "type": "text"
+                },
+                "collection": {
+                  "type": "keyword"
+                },
+                "series": {
+                  "type": "text"
+                },
+                "editor_reference": {
+                  "type": "keyword"
+                },
+                "isbn_number": {
+                  "type": "keyword"
+                },
+                "summary": {
+                  "type": "object",
+                  "properties": {
+                    "en": {
+                      "type": "text"
+                    },
+                    "fr": {
+                      "type": "text",
+                      "analyzer": "french",
+                      "search_analyzer": "french_search"
+                    }
+                  }
+                },
+                "publisher_words": {
+                  "type": "object",
+                  "properties": {
+                    "en": {
+                      "type": "text"
+                    },
+                    "fr": {
+                      "type": "text",
+                      "analyzer": "french",
+                      "search_analyzer": "french_search"
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+        
+        
+        Update index mappings:
+        ======================
+        
+        PUT /onf_website_v2
+        {... index_settings ...}
+        
+        POST /_reindex
+        {
+            "source": {
+                "index": "onf_website-v1",
+                "size": 10
+            },
+            "dest": {
+                "index": "onf_website-v2",
+                "pipeline": "attachment"
+            }
+        }
+        
+        DELETE /onf_website
+        
+        PUT /_aliases
+        {
+            "actions": {
+                "add": {
+                    "index": "onf_website-v2",
+                    "alias": "onf_website"
+                }
+            }
+        }
+        
+        
+        
         History
         =======
         
+        0.1.19
+        ------
+         - added resource index info
+         - updated object modified event subscriber to allow indexation of several objects in the same transaction
+         - updated index mapping
+        
         0.1.18
         ------
          - corrected relevance sorting
--- a/src/pyams_content_es.egg-info/SOURCES.txt	Fri Dec 28 10:24:48 2018 +0100
+++ b/src/pyams_content_es.egg-info/SOURCES.txt	Fri Dec 28 11:04:29 2018 +0100
@@ -33,6 +33,7 @@
 src/pyams_content_es/scripts/__init__.py
 src/pyams_content_es/scripts/index.py
 src/pyams_content_es/shared/__init__.py
+src/pyams_content_es/shared/resource.py
 src/pyams_content_es/shared/view/__init__.py
 src/pyams_content_es/shared/view/reference.py
 src/pyams_content_es/tests/__init__.py