elastic and solr
This commit is contained in:
parent
7580d03c8b
commit
0106e2e3bd
25
elasticsearch/README.md
Normal file
25
elasticsearch/README.md
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
gitea: none
|
||||
include_toc: true
|
||||
---
|
||||
# Elasticsearch
|
||||
|
||||
## Show Indizes
|
||||
|
||||
```
|
||||
curl 'localhost:9200/_cat/indices?v&h=i,tm&s=tm:desc'
|
||||
```
|
||||
|
||||
## Show Version
|
||||
|
||||
```
|
||||
curl -XGET 'localhost:9200'
|
||||
or
|
||||
/usr/share/elasticsearch/bin/elasticsearch --version
|
||||
```
|
||||
|
||||
## memory too low
|
||||
|
||||
```
|
||||
root@nbrutishauser:/home/roru/atom# sysctl -w vm.max_map_count=262144
|
||||
```
|
||||
56
solr/README.md
Normal file
56
solr/README.md
Normal file
@ -0,0 +1,56 @@
|
||||
---
|
||||
gitea: none
|
||||
include_toc: true
|
||||
---
|
||||
# Solr
|
||||
|
||||
Home-Verzeichnis von Solr: `/opt/solr-9.0.0/server/solr`
|
||||
|
||||
## Curl Commands
|
||||
|
||||
### Select by updated (from <date> to infinite)
|
||||
|
||||
```
|
||||
curl -X GET "http://localhost:8983/solr/beispiel-core/select?q=updated_on:\[2020-04-02T15:13:30Z%20TO%20*\]"
|
||||
```
|
||||
|
||||
### Show Schema
|
||||
|
||||
```
|
||||
curl -X GET -u solr:daspasswort "https://solr.beispiel-access-stage.whatever.info/solr/beispiel-access/schema"
|
||||
```
|
||||
|
||||
### Show Fields
|
||||
|
||||
```
|
||||
curl -X GET -u solr:daspasswort "https://solr.beispiel-access-stage.whatever.info/solr/beispiel-access/schema/fields"
|
||||
```
|
||||
|
||||
### Update Field
|
||||
|
||||
```
|
||||
curl -X POST -H 'Content-type:application/json' -u solr:daspasswort --data-binary '{
|
||||
"replace-field":{
|
||||
"name":"updated_on",
|
||||
"type":"pdate",
|
||||
"indexed":true }
|
||||
}' "https://solr.beispiel-access-stage.whatever.info/solr/beispiel-access/schema"
|
||||
```
|
||||
|
||||
### Send documents
|
||||
|
||||
```
|
||||
curl -X POST -H 'Content-Type: application/json' -u solr:<password> 'https://solr.beispiel-access-stage.whatever.info/solr/beispiel-access/update?commitWithin=1000' --data-binary @standardOutput.json
|
||||
```
|
||||
|
||||
### Delete document by id
|
||||
|
||||
```
|
||||
curl -X POST -H 'Content-Type: text/xml' -u solr:<password> 'https://solr.beispiel-access-stage.whatever.info/solr/beispiel-access/update?commit=true' --data-binary '<delete><id>111-1</id></delete>'
|
||||
```
|
||||
|
||||
### Delete ALL documents (CAUTION
|
||||
|
||||
```
|
||||
curl -X POST -H 'Content-Type: text/xml' -u solr:<password> 'https://solr.beispiel-access-stage.whatever.info/solr/beispiel-access/update?commit=true' --data-binary '<delete><query>*:*</query></delete>'
|
||||
```
|
||||
Loading…
Reference in New Issue
Block a user