Created
November 18, 2014 01:58
-
-
Save marklin-latte/f53b5ad092e5e5c6be50 to your computer and use it in GitHub Desktop.
ElasticSearch-search index mapping
This file contains 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
//URI | |
GET http://localhost:9200/test1/_mapping | |
(test1 is index) | |
//Result | |
{ | |
"test1": { | |
"mappings": { | |
"attachment": { | |
"properties": { | |
"documentId": { | |
"type": "string" | |
}, | |
"file": { | |
"type": "attachment", | |
"path": "full", | |
"fields": { | |
"file": { | |
"type": "string", | |
"store": true, | |
"term_vector": "with_positions_offsets" | |
}, | |
"author": { | |
"type": "string" | |
}, | |
"title": { | |
"type": "string", | |
"store": true | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"date": { | |
"type": "date", | |
"format": "dateOptionalTime" | |
}, | |
"keywords": { | |
"type": "string" | |
}, | |
"content_type": { | |
"type": "string" | |
}, | |
"content_length": { | |
"type": "integer" | |
}, | |
"language": { | |
"type": "string" | |
} | |
} | |
}, | |
"organizeId": { | |
"type": "string" | |
}, | |
"projectId": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
} | |
type attachment is a plugin , it can parse office file or pdf file , | |
and you can search file content ! | |
https://github.com/elasticsearch/elasticsearch-mapper-attachments | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment