####Rechercher les films avec les acteurs « Clint Eastwood » et « Lee Van Cleef »
GET ratings/movie/_search
{
"query":{
"bool": {
"must": [| const storage = new Storage({ | |
| projectId: projectId, | |
| credentials: { | |
| client_email: process.env.CLIENT_EMAIL, | |
| private_key: process.env.PRIVATE_KEY.replace(/\\n/g, '\n') | |
| } | |
| }); |
| const getPublicUrl = (filename) => { | |
| return `https://storage.googleapis.com/${bucket.name}/${filename}`; | |
| } | |
| const sendUploadToGCS = (req, res, next) => { | |
| if (!req.file) { | |
| return next(); | |
| } | |
| console.log("Start to upload"+constants.processedVideosPath + req.file.filename) | |
| const gcsname = Date.now() + req.file.originalname; |
| const compressVideo = (req,res,next) => { | |
| var cmd = 'ffmpeg'; | |
| var args = [ | |
| '-i', constants.rawVideosPath + req.file.filename, | |
| '-c', 'copy', | |
| '-vcodec', 'libx264', | |
| '-crf', '24', | |
| '-an', constants.processedVideosPath + req.file.filename | |
| ]; |
| app.post('/social_upload', upload.single('media'), function (req, res, next) { | |
| // req.file is the `media` (video) file | |
| // req.body will hold the text fields, if there were any | |
| }) |
| html | |
| head | |
| title Social feed form | |
| body | |
| h1 Hello World | |
| form(action="/socials/social_upload" method="post" enctype="multipart/form-data") | |
| p | |
| | social media: | |
| input(type='file', name='media', value='') | |
| input(type='submit', value='Submit') |
| <html> | |
| <head> | |
| <title>ol3 - Ex6C</title> | |
| <link rel="stylesheet" href="http://openlayers.org/en/v3.1.1/css/ol.css" type="text/css"> | |
| <link rel="stylesheet" href="lib/layerswitcher/ol3-layerswitcher.css" type="text/css"> | |
| <script src="lib/ol3.1.1/build/ol.js" type="text/javascript"></script> | |
| <script src="lib/jquery-2.1.3.min.js" type="text/javascript"></script> | |
| <script type="text/javascript"> | |
| var map; | |
| $(document).ready(function(){ |
| POST /_bulk | |
| { "create": { "_index": "ratings", "_type": "movie", "_id": "1" }} | |
| {"title":"Django Unchained","date":"2013-01-16","directors":["Quentin Tarantino"],"actors":["Jamie Foxx","Christoph Waltz"],"types":["Western"],"presse_rating":4.5,"public_rating":4.6,"description":"Le parcours d'un chasseur de prime allemand et d'un homme noir pour retrouver la femme de ce dernier retenue en esclavage par le propriétaire d'une plantation..."} | |
| { "create": { "_index": "ratings", "_type": "movie", "_id": "2" }} | |
| {"title":"Forrest Gump","date":"1994-10-05","directors":["Robert Zemeckis"],"actors":["Tom Hanks","Gary Sinise"],"types":["Comédie dramatique","Romance"],"presse_rating":2.6,"public_rating":4.5,"description":"Quelques décennies d'histoire américaine, des années 1940 à la fin du XXème siècle, à travers le regard et l'étrange odyssée d'un homme simple et pur, Forrest Gump."} | |
| { "create": { "_index": "ratings", "_type": "movie", "_id": "3" }} | |
| {"title":"La Ligne verte","date":"2000-03-01","directors":["Frank Dar |
| POST /_bulk | |
| { "create": { "_index": "ratings", "_type": "movie", "_id": "1" }} | |
| {"title":"Django Unchained","date":"2013-01-16","directors":["Quentin Tarantino"],"actors":["Jamie Foxx","Christoph Waltz"],"genres":["Western"],"presse_rating":4.5,"public_rating":4.6,"description":"Le parcours d'un chasseur de prime allemand et d'un homme noir pour retrouver la femme de ce dernier retenue en esclavage par le propriétaire d'une plantation..."} | |
| { "create": { "_index": "ratings", "_type": "movie", "_id": "2" }} | |
| {"title":"Forrest Gump","date":"1994-10-05","directors":["Robert Zemeckis"],"actors":["Tom Hanks","Gary Sinise"],"genres":["Comédie dramatique","Romance"],"presse_rating":2.6,"public_rating":4.5,"description":"Quelques décennies d'histoire américaine, des années 1940 à la fin du XXème siècle, à travers le regard et l'étrange odyssée d'un homme simple et pur, Forrest Gump."} | |
| { "create": { "_index": "ratings", "_type": "movie", "_id": "3" }} | |
| {"title":"La Ligne verte","date":"2000-03-01","directors":["Frank D |