This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String.prototype.turkishtoEnglish = function () { | |
| return this.replace('Ğ','g') | |
| .replace('Ü','u') | |
| .replace('Ş','s') | |
| .replace('I','i') | |
| .replace('İ','i') | |
| .replace('Ö','o') | |
| .replace('Ç','c') | |
| .replace('ğ','g') | |
| .replace('ü','u') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| es-import-bulk --url http://localhost:9200 --file data.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| es-export-bulk --url elasticsearch-ip --file path-adresi --index es-index-adı | |
| es-export-bulk --url http://localhost:9200 --file data.json --index myIndex |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| npm install -g elasticsearch-tools |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 80; | |
| root /usr/share/nginx/html/laravel/public; | |
| index index.php index.html index.htm; | |
| server_name laravel.dev; | |
| location / { | |
| try_files $uri $uri/ /index.php?$query_string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Author: Engin Kartal | |
| //Blog Post: http://enginkartal.com.tr/mongodb-remove/ | |
| db.collection.remove( | |
| <query>, | |
| { | |
| justOne: <boolean>, | |
| writeConcern: <document> | |
| } | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Author: Engin Kartal | |
| //Blog Post: http://enginkartal.com.tr/mongodb-mantiksal-logical-operatorler/ | |
| //AND operatörü | |
| //Aşağıdaki sorgu bize geri author="Engin Kartal" ve "likes" sayısı 5'e eşit olan kayıtları döner. | |
| db.content.find({$and:[{author:'Engin Kartal'},{likes:5}]) | |
| //author="Engin Kartal" ve "likes" sayısı 10'dan az olan kayıtlar | |
| db.content.find({$and:[{author:{$eq:'Engin Kartal'}},{likes:{$lt:10}}]) | |
| //OR operatörü |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Author: Engin Kartal | |
| //Blog Post: http://enginkartal.com.tr/mongodb-karsilastirma-operatorleri/ | |
| //eq operatörü :: Eşittir | |
| //Aşağıdaki sorgu bize geri "likes" sayısı 7'ye eşit olanları döner. | |
| db.content.find({likes:{$eq:7}}) | |
| //ne(not equal) operatörü :: Eşit Değildir. | |
| //Aşağıdaki sorgu bize geri "author"u "Engin Kartal"'a eşit olmayan kayıtları döner. | |
| db.content.find({author:{$ne:'Engin Kartal'}}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //content dokümanındaki tüm 'url' fiedlarının adını link olarak değiştiriyoruz. | |
| db.content.update({},{$rename:{'url':'link'}},false,true) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //aşağıdaki şekilde author küçükten büyüğe indexlenir. | |
| db.content.createIndex("author":1) | |
| //aşağıdaki şekilde ise author büyükten küçüğe indexlenir. | |
| db.content.createIndex("author":-1) |
NewerOlder