elasticsearch+fscrawler+kibana

2020-06-03 00:00:00 专区 订阅 付费 希望 建立一个

1, start fscrawler

bin/fscrawler job_name

or start with rest

bin/fscrawler --rest job_name


2, Visit it via rest and upload file

curl 127.0.0.1:8084/fscrawle

echo "hello world" >test.txt

curl -F "file=@test.txt" "127.0.0.1:8084/fscrawle"

3, Query via kibana console


GET gavin_test/_search

#Qeuery with key words for any of below words

GET gavin_test/_search

{

"query" : {

"query_string": {

"query": "year,month,passengers"

}

}

}

#Query content with "keyword" passengers.

GET gavin_test/_search

{

"query" : {

"match" : {

"content" : "passengers"

}

}

}

{

"took": 1,

"timed_out": false,

"_shards": {

"total": 5,

"successful": 5,

"skipped": 0,

"failed": 0

},

"hits": {

"total": 1,

"max_score": 1.5862886,

"hits": [

{

"_index": "gavin_test",

"_type": "doc",

"_id": "de9ad35745c3d29da800d9742b1364",

"_score": 1.5862886,

"_source": {

"content": """

aaaaaaaaaa

""",

"meta": {

},

"file": {

"extension": "csv",

"content_type": "text/csv; charset=ISO-8859-1",

"created": "2018-08-12T11:59:37.140+0000",

"last_modified": "2018-08-12T11:59:37.140+0000",

"last_accessed": "2018-08-12T11:59:36.820+0000",

"indexing_date": "2018-08-12T12:01:22.946+0000",

"filesize": 2350,

"filename": "flights.csv",

"url": "file:///tmp/es/flights.csv"

},

"path": {

"root": "824b64ab42d4b63cda6e747e2b80e5",

"virtual": "/flights.csv",

"real": "/tmp/es/flights.csv"

}

}

}

]

}

}

GET /

{"name": "wFXuWSc",

"cluster_name": "elasticsearch",

"cluster_uuid": "aEFzRUWDT0yzNMZXbBz7Ew",

"version": {

"number": "5.6.10",

"build_hash": "b727a60",

"build_date": "2018-06-06T15:48:34.860Z",

"build_snapshot": false,

"lucene_version": "6.6.1"

},

"tagline": "You Know, for Search"

}

相关文章