Version 0.1.25 0.1.25
authorThierry Florac <tflorac@ulthar.net>
Fri, 18 Jan 2019 15:43:08 +0100
changeset 144 1d07028b9283
parent 143 d02a2552ea24
child 145 e4619912623d
Version 0.1.25
buildout.cfg
docs/HISTORY.txt
docs/README.txt
docs/mappings/index-settings.json
setup.py
src/pyams_content_es.egg-info/PKG-INFO
--- a/buildout.cfg	Wed Jan 16 15:43:57 2019 +0100
+++ b/buildout.cfg	Fri Jan 18 15:43:08 2019 +0100
@@ -76,4 +76,4 @@
 eggs = pyams_content_es [test]
 
 [versions]
-pyams_content_es = 0.1.24
+pyams_content_es = 0.1.25
--- a/docs/HISTORY.txt	Wed Jan 16 15:43:57 2019 +0100
+++ b/docs/HISTORY.txt	Fri Jan 18 15:43:08 2019 +0100
@@ -1,6 +1,10 @@
 History
 =======
 
+0.1.25
+------
+ - updated mappings and index info to get workflow visible publication date
+
 0.1.24
 ------
  - use workflow "visible" states instead of "published" states
--- a/docs/README.txt	Wed Jan 16 15:43:57 2019 +0100
+++ b/docs/README.txt	Fri Jan 18 15:43:08 2019 +0100
@@ -4,217 +4,81 @@
 
 curl --noproxy localhost -XPUT    http://localhost:9200/_ingest/pipeline/attachment -d @attachment.json
 
-curl --noproxy localhost -XDELETE http://localhost:9200/onf_website
-curl --noproxy localhost -XPUT    http://localhost:9200/onf_website -d @index-settings.json
-
-curl --noproxy localhost -XPUT    http://localhost:9200/onf_website/WfNewsEvent/_mapping -d @mappings/WfNewsEvent.json
-curl --noproxy localhost -XPUT    http://localhost:9200/onf_website/WfTopic/_mapping -d @mappings/WfTopic.json
-curl --noproxy localhost -XPUT    http://localhost:9200/onf_website/WfBlogPost/_mapping -d @mappings/WfBlogPost.json
+curl --noproxy localhost -XDELETE http://localhost:9200/pyams-v1
+curl --noproxy localhost -XPUT    http://localhost:9200/pyams-v1 -d @index-settings.json
 
 
-PUT /onf_website/_mapping/_doc
+PUT /pyams/_mapping/_doc
 {
   "properties": {
-    "header": {
-      "type": "object",
-      "properties": {
-        "en": {
-          "type": "text"
-        },
-        "fr": {
-          "type": "text",
-          "analyzer": "french",
-          "search_analyzer": "french_search"
-        }
-      }
-    }
-  }
-}
-
-
-PUT /onf_website/_mapping/_doc
-{
-  "properties": {
-    "parent_ids": {
-      "type": "keyword"
-    }
-  }
-}
-
-
-PUT /onf_website/_mapping/_doc
-{
-  "properties": {
-    "resource_info": {
+    "workflow": {
       "type": "object",
       "properties": {
-        "original_title": {
-          "type": "text"
-        },
-        "author": {
-          "type": "text"
-        },
-        "translator": {
-          "type": "text"
-        },
-        "illustrator": {
-          "type": "text"
-        },
-        "drawer": {
-          "type": "text"
-        },
-        "colourist": {
-          "type": "text"
-        },
-        "lettering": {
-          "type": "text"
-        },
-        "producer": {
-          "type": "text"
-        },
-        "director": {
-          "type": "text"
-        },
-        "actors": {
-          "type": "text"
-        },
-        "editor": {
-          "type": "text"
-        },
-        "collection": {
+        "name": {
           "type": "keyword"
         },
-        "series": {
-          "type": "text"
+        "date": {
+          "type": "date"
         },
-        "editor_reference": {
-          "type": "keyword"
-        },
-        "isbn_number": {
+        "status": {
           "type": "keyword"
         },
-        "awards": {
-          "type": "object",
-          "properties": {
-            "en": {
-              "type": "text"
-            },
-            "fr": {
-              "type": "text",
-              "analyzer": "french",
-              "search_analyzer": "french_search"
-            }
-          }
+        "created_date": {
+          "type": "date"
+        },
+        "modified_date": {
+          "type": "date"
         },
-        "summary": {
-          "type": "object",
-          "properties": {
-            "en": {
-              "type": "text"
-            },
-            "fr": {
-              "type": "text",
-              "analyzer": "french",
-              "search_analyzer": "french_search"
-            }
-          }
+        "publication_date": {
+          "type": "date"
+        },
+        "effective_date": {
+          "type": "date"
         },
-        "synopsis": {
-          "type": "object",
-          "properties": {
-            "en": {
-              "type": "text"
-            },
-            "fr": {
-              "type": "text",
-              "analyzer": "french",
-              "search_analyzer": "french_search"
-            }
-          }
+        "push_end_date": {
+          "type": "date"
+        },
+        "expiration_date": {
+          "type": "date"
         },
-        "publisher_words": {
-          "type": "object",
-          "properties": {
-            "en": {
-              "type": "text"
-            },
-            "fr": {
-              "type": "text",
-              "analyzer": "french",
-              "search_analyzer": "french_search"
-            }
-          }
+        "first_publication_date": {
+          "type": "date"
+        },
+        "visible_publication_date": {
+          "type": "date"
         }
       }
     }
   }
 }
 
-PUT /onf_website/_mapping/_doc
-{
-  "properties": {
-    "link": {
-        "type": "object",
-        "properties": {
-            "title": {
-                "type": "object",
-                "properties": {
-                    "en": {
-                        "type": "text"
-                    },
-                    "fr": {
-                        "type": "text",
-                        "analyzer": "french",
-                        "search_analyzer": "french_search"
-                    }
-                }
-            },
-            "description": {
-                "type": "object",
-                "properties": {
-                    "en": {
-                        "type": "text"
-                    },
-                    "fr": {
-                        "type": "text",
-                        "analyzer": "french",
-                        "search_analyzer": "french_search"
-                    }
-                }
-            }
-        }
-    }
-  }
-}
-
 
 Update index mappings:
 ======================
 
-PUT /onf_website_v2
+PUT /pyams-v2
 {... index_settings ...}
 
 POST /_reindex
 {
     "source": {
-        "index": "onf_website-v1",
+        "index": "pyams-v1",
         "size": 10
     },
     "dest": {
-        "index": "onf_website-v2",
+        "index": "pyams-v2",
         "pipeline": "attachment"
     }
 }
 
-DELETE /onf_website
+DELETE /pyams
 
 POST /_aliases
 {
     "actions": {
         "add": {
-            "index": "onf_website-v2",
-            "alias": "onf_website"
+            "index": "pyams-v2",
+            "alias": "pyams"
         }
     }
 }
-
--- a/docs/mappings/index-settings.json	Wed Jan 16 15:43:57 2019 +0100
+++ b/docs/mappings/index-settings.json	Fri Jan 18 15:43:08 2019 +0100
@@ -191,6 +191,9 @@
 						},
 						"first_publication_date": {
 							"type": "date"
+						},
+						"visible_publication_date": {
+							"type": "date"
 						}
 					}
 				},
@@ -287,61 +290,6 @@
 						}
 					}
 				},
-				"location": {
-					"type": "object",
-					"properties": {
-						"coords": {
-							"type": "geo_point"
-						},
-						"forests": {
-							"type": "keyword"
-						},
-						"cities": {
-							"type": "keyword"
-						},
-						"departments": {
-							"type": "keyword"
-						},
-						"countries": {
-							"type": "keyword"
-						},
-						"structures": {
-							"type": "keyword"
-						}
-					}
-				},
-				"hearing": {
-					"type": "object",
-					"properties": {
-						"targets": {
-							"type": "keyword"
-						},
-						"national_scope": {
-							"type": "boolean"
-						},
-						"forests": {
-							"type": "keyword"
-						},
-						"cities": {
-							"type": "keyword"
-						},
-						"departments": {
-							"type": "keyword"
-						},
-						"countries": {
-							"type": "keyword"
-						},
-						"structures": {
-							"type": "keyword"
-						},
-						"source_site": {
-							"type": "keyword"
-						},
-						"diffusion_sites": {
-							"type": "keyword"
-						}
-					}
-				},
 				"tags": {
 					"type": "keyword"
 				},
--- a/setup.py	Wed Jan 16 15:43:57 2019 +0100
+++ b/setup.py	Fri Jan 18 15:43:08 2019 +0100
@@ -22,7 +22,7 @@
 README = os.path.join(DOCS, 'README.txt')
 HISTORY = os.path.join(DOCS, 'HISTORY.txt')
 
-version = '0.1.24'
+version = '0.1.25'
 long_description = open(README).read() + '\n\n' + open(HISTORY).read()
 
 tests_require = []
--- a/src/pyams_content_es.egg-info/PKG-INFO	Wed Jan 16 15:43:57 2019 +0100
+++ b/src/pyams_content_es.egg-info/PKG-INFO	Fri Jan 18 15:43:08 2019 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pyams-content-es
-Version: 0.1.24
+Version: 0.1.25
 Summary: PyAMS content interfaces and classes for ElasticSearch indexation
 Home-page: http://hg.ztfy.org/pyams/pyams_content_es
 Author: Thierry Florac
@@ -12,225 +12,93 @@
         
         curl --noproxy localhost -XPUT    http://localhost:9200/_ingest/pipeline/attachment -d @attachment.json
         
-        curl --noproxy localhost -XDELETE http://localhost:9200/onf_website
-        curl --noproxy localhost -XPUT    http://localhost:9200/onf_website -d @index-settings.json
-        
-        curl --noproxy localhost -XPUT    http://localhost:9200/onf_website/WfNewsEvent/_mapping -d @mappings/WfNewsEvent.json
-        curl --noproxy localhost -XPUT    http://localhost:9200/onf_website/WfTopic/_mapping -d @mappings/WfTopic.json
-        curl --noproxy localhost -XPUT    http://localhost:9200/onf_website/WfBlogPost/_mapping -d @mappings/WfBlogPost.json
+        curl --noproxy localhost -XDELETE http://localhost:9200/pyams-v1
+        curl --noproxy localhost -XPUT    http://localhost:9200/pyams-v1 -d @index-settings.json
         
         
-        PUT /onf_website/_mapping/_doc
+        PUT /pyams/_mapping/_doc
         {
           "properties": {
-            "header": {
-              "type": "object",
-              "properties": {
-                "en": {
-                  "type": "text"
-                },
-                "fr": {
-                  "type": "text",
-                  "analyzer": "french",
-                  "search_analyzer": "french_search"
-                }
-              }
-            }
-          }
-        }
-        
-        
-        PUT /onf_website/_mapping/_doc
-        {
-          "properties": {
-            "parent_ids": {
-              "type": "keyword"
-            }
-          }
-        }
-        
-        
-        PUT /onf_website/_mapping/_doc
-        {
-          "properties": {
-            "resource_info": {
+            "workflow": {
               "type": "object",
               "properties": {
-                "original_title": {
-                  "type": "text"
-                },
-                "author": {
-                  "type": "text"
-                },
-                "translator": {
-                  "type": "text"
-                },
-                "illustrator": {
-                  "type": "text"
-                },
-                "drawer": {
-                  "type": "text"
-                },
-                "colourist": {
-                  "type": "text"
-                },
-                "lettering": {
-                  "type": "text"
-                },
-                "producer": {
-                  "type": "text"
-                },
-                "director": {
-                  "type": "text"
-                },
-                "actors": {
-                  "type": "text"
-                },
-                "editor": {
-                  "type": "text"
-                },
-                "collection": {
+                "name": {
                   "type": "keyword"
                 },
-                "series": {
-                  "type": "text"
+                "date": {
+                  "type": "date"
                 },
-                "editor_reference": {
-                  "type": "keyword"
-                },
-                "isbn_number": {
+                "status": {
                   "type": "keyword"
                 },
-                "awards": {
-                  "type": "object",
-                  "properties": {
-                    "en": {
-                      "type": "text"
-                    },
-                    "fr": {
-                      "type": "text",
-                      "analyzer": "french",
-                      "search_analyzer": "french_search"
-                    }
-                  }
+                "created_date": {
+                  "type": "date"
+                },
+                "modified_date": {
+                  "type": "date"
                 },
-                "summary": {
-                  "type": "object",
-                  "properties": {
-                    "en": {
-                      "type": "text"
-                    },
-                    "fr": {
-                      "type": "text",
-                      "analyzer": "french",
-                      "search_analyzer": "french_search"
-                    }
-                  }
+                "publication_date": {
+                  "type": "date"
+                },
+                "effective_date": {
+                  "type": "date"
                 },
-                "synopsis": {
-                  "type": "object",
-                  "properties": {
-                    "en": {
-                      "type": "text"
-                    },
-                    "fr": {
-                      "type": "text",
-                      "analyzer": "french",
-                      "search_analyzer": "french_search"
-                    }
-                  }
+                "push_end_date": {
+                  "type": "date"
+                },
+                "expiration_date": {
+                  "type": "date"
                 },
-                "publisher_words": {
-                  "type": "object",
-                  "properties": {
-                    "en": {
-                      "type": "text"
-                    },
-                    "fr": {
-                      "type": "text",
-                      "analyzer": "french",
-                      "search_analyzer": "french_search"
-                    }
-                  }
+                "first_publication_date": {
+                  "type": "date"
+                },
+                "visible_publication_date": {
+                  "type": "date"
                 }
               }
             }
           }
         }
         
-        PUT /onf_website/_mapping/_doc
-        {
-          "properties": {
-            "link": {
-                "type": "object",
-                "properties": {
-                    "title": {
-                        "type": "object",
-                        "properties": {
-                            "en": {
-                                "type": "text"
-                            },
-                            "fr": {
-                                "type": "text",
-                                "analyzer": "french",
-                                "search_analyzer": "french_search"
-                            }
-                        }
-                    },
-                    "description": {
-                        "type": "object",
-                        "properties": {
-                            "en": {
-                                "type": "text"
-                            },
-                            "fr": {
-                                "type": "text",
-                                "analyzer": "french",
-                                "search_analyzer": "french_search"
-                            }
-                        }
-                    }
-                }
-            }
-          }
-        }
-        
         
         Update index mappings:
         ======================
         
-        PUT /onf_website_v2
+        PUT /pyams-v2
         {... index_settings ...}
         
         POST /_reindex
         {
             "source": {
-                "index": "onf_website-v1",
+                "index": "pyams-v1",
                 "size": 10
             },
             "dest": {
-                "index": "onf_website-v2",
+                "index": "pyams-v2",
                 "pipeline": "attachment"
             }
         }
         
-        DELETE /onf_website
+        DELETE /pyams
         
         POST /_aliases
         {
             "actions": {
                 "add": {
-                    "index": "onf_website-v2",
-                    "alias": "onf_website"
+                    "index": "pyams-v2",
+                    "alias": "pyams"
                 }
             }
         }
         
         
-        
         History
         =======
         
+        0.1.25
+        ------
+         - updated mappings and index info to get workflow visible publication date
+        
         0.1.24
         ------
          - use workflow "visible" states instead of "published" states