Skip to content

ipedrazas/search-ctl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

search-ctl

Little python script to search an ElasticSearch index from the command line. Utterly useless

curl -XDELETE 'http://localhost:9200/code/'


curl -XPUT 'localhost:9200/code' -d '{
 "settings" : {
 },
 "mappings" : {
     "source_file" : {
         "properties" : {
             "file_name" : {
                 "type" : "string",
                 "analyzer" : "standard"
             },
             "path" : {
                 "type" : "string",
                 "analyzer" : "standard"
             },
             "language" : {
                 "type" : "string",
                 "analyzer" : "standard"
             },
             "source_code" : {
                 "type" : "string",
                 "analyzer" : "standard"
             }
         }
     }
 }
}'

curl -XGET http://localhost:9200/code/_search\?pretty -d '{
     "query" : {
         "term" : { "language": "py" }
     }
 }'

About

Little python script to search an ElasticSearch index from the command line. Utterly useless

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages