Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- curl -XPUT 'http://localhost:9200/3click/text/<номер блока>' -d '
- {
- "id":"<номер блока>",
- "filename": "имя_файла",
- "content":"<строка индексируемого текста, состоит ТОЛЬКО из букв латинницы и кириллицы, цифр и пробелов>",
- "tags":"test,дед_мороз"
- }'
- {"_index":"3click","_type":"text","_id":"1","_version":1,"_shards":{"total":2,"successful":1,"failed":0},"created":true}
- curl -XPUT "http://localhost:9200/3click/text/_mapping" -d '{
- "text": {
- "_all" : {"analyzer" : "russian_morphology"},
- "properties" : {
- "id" : {"type" : "integer"},
- "filename":{"type":"string"},
- "content" : { "type" : "string", "analyzer" : "russian_morphology" },
- "tags" : {"type":"string"}
- }
- }
- }'
- curl -XPUT "http://localhost:9200/3click" -d '{
- "settings": {
- "analysis": {
- "analyzer": {
- "my_analyzer": {
- "type": "custom",
- "tokenizer": "standard",
- "filter": ["lowercase", "russian_morphology", "english_morphology", "my_stopwords"]
- }
- },
- "filter": {
- "my_stopwords": {
- "type": "stop",
- "stopwords": "а,без,...,will,with"
- }
- }
- }
- }
- }' здесь как-то можно перевод строк нормально добавлять?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement