Comments (4)
I can add that mapping and query seems OK, since when I add a second document (PDF in this case) with the same previous method, i.e.:
coded=`cat download/sherlock_holmes.pdf | perl -MMIME::Base64 -ne 'print encode_base64($_)'`
echo "{\"file\":\"${coded}\"}" > sk-b64.json
curl -X POST "localhost:9200/myepubcontents/books" -d @sk-b64.json
I can query again elastic search, the two docuemtns hits, but the PDF is fetched along its date, author, and title, while the epub is not :
curl -XGET 'http://localhost:9200/myepubcontents/books/_search?pretty=true&explain=false' -d '{ "fields" : [ "title", "author", "date" ],
> "query": {
> "query_string" : {
> "fields" : [ "file" ],
> "query" : "a*",
> "use_dis_max" : true }
> },
> "highlight" : {
> "fields" : {
> "file" : {}
> }
> }
> }'
{
"took" : 79,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 2,
"max_score" : 1.0,
"hits" : [ {
"_index" : "myepubcontents",
"_type" : "books",
"_id" : "dcHGZRSPRZW_JjpHJ4S7QQ",
"_score" : 1.0,
"fields" : {
"file.date" : "2011-02-22T02:08:19.000Z",
"file.author" : "Arthur Conan Doyle",
"file.title" : "The Adventures of Sherlock Holmes"
},
"highlight" : {
"file" : [ " of \n\nit. \n\n\"Eight weeks passed <em>away</em> like this, and I had written <em>about</em> <em>Abbots</em> and <em>Archery</em> and \n\n<em>Armour</em>", " and predominates the whole of her \n\nsex. It was not that he felt <em>any</em> emotion <em>akin</em> to love for Irene <em>Adler</em>. <em>All</em>", ". They were <em>all</em> three standing in a knot in front of the \n\n<em>altar</em>. I lounged up the side <em>aisle</em> like <em>any</em>", " the <em>acquaintance</em> of the well-known <em>adventuress</em>, Irene <em>Adler</em>. The name is no \n\ndoubt familiar to you.\" \n\n\"Kindly", " to.\" \n\n\"And what of Irene <em>Adler</em>?\" I <em>asked</em>. \n\n\"Oh, she has turned <em>all</em> the men's heads down in that part. She" ]
}
}, {
"_index" : "myepubcontents",
"_type" : "books",
"_id" : "-oggjyFPQFqrMh3kN9giDw",
"_score" : 1.0,
"highlight" : {
"file" : [ " numbers.\n<em>Also</em>, in real computers, <em>arithmetic</em> operations are <em>almost</em> <em>always</em>\nperformed with limited", " we are <em>asked</em> to <em>apply</em> the procedure to some\n<em>argument</em>, we first look to see if the value is <em>already</em>", " <em>advantages</em>, however. One of\nthem is that it can <em>accommodate</em> procedures that may take an <em>arbitrary</em>", "\n\n\n\n\n\n\nNo <em>ambiguity</em> can <em>arise</em>, because the operator is <em>always</em> the leftmost\nelement and the entire", " <em>appear</em> in\n<em>any</em> powerful programming language:\n\n\n\n\n\n\n\n\n\t\tNumbers and <em>arithmetic</em> operations are\nprimitive" ]
}
} ]
}
}
from elasticsearch-mapper-attachments.
the tika version used in the plugin seems to be 1.2 - maybe support for epub has been added later?
from elasticsearch-mapper-attachments.
I tested it with the current version in master (with Tika 1.4) and get it worked.
The issue is not about Tika version but you hit the max length (default to 100000
).
You need to increase that value in order to get all content (including metadata as well).
I set for example "index.mapping.attachment.indexed_chars":-1
and get all expected metadata.
from elasticsearch-mapper-attachments.
Thanks for the tip !
from elasticsearch-mapper-attachments.
Related Issues (20)
- Update to elasticsearch 2.1.2
- This plugin is incompatible with elasticsearch 2.2.0 HOT 5
- Loosing file.content on _update HOT 5
- Searching iWork files HOT 1
- Failed to index docx file with mapper-attachments plugin that comes with Elasticsearch 2.3.1 HOT 2
- Support for Elasticsearch 2.2.1 HOT 1
- Extracting "subject" and "page count" out of a pdf document HOT 2
- Filtered Query Match on Document Contents Not Working
- Unable to build HOT 1
- copy_to not working as expected HOT 1
- build it with gradle error HOT 1
- Plugin doesn't work with embedded elasticsearch in spring boot app's uber JAR HOT 1
- the txt file can't be search HOT 1
- mapper-attachments (documentation) link is broken HOT 1
- NodeJS example HOT 2
- ERROR: Plugin [mapper-attachments] is incompatible with Elasticsearch [2.4.4]. Was designed for version [2.1.2] HOT 3
- pdfbox error HOT 1
- Make the plugin available for ES6 HOT 1
- Please update Bouncy Castle HOT 1
- Support Elasticsearch 7.x HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elasticsearch-mapper-attachments.