Ok. I think that you should consider to use the new plugin repository, even
if it should be the same content.
https://github.com/elasticsearch/elasticsearch-mapper-attachments
I use this version (1.0.0).
Could you gist a curl recreation ? ( http://www.elasticsearch.org/help/
http://www.elasticsearch.org/help/)
Not sure I can answer right now (time to sleep here ;-)), but I could have a
look at it tomorrow (or perhaps someone else will answer before).
Some other question.
When you index your doc, do you see updating mapping in logs ?
Can you check also that your mapping is the one you think it is ?
I suspect that your mapping has not been taken into account and that ES
thinks that your attachment field is only a string
David.
De : elasticsearch@googlegroups.com [mailto:elasticsearch@googlegroups.com]
De la part de Shairon Toledo
Envoyé : lundi 23 janvier 2012 23:41
À : elasticsearch@googlegroups.com
Objet : Re: mapper-attachments and highlights
Hi David,
My env is
elasticsearch-0.18.7
elasticsearch-mapper-attachments-0.18.7.jar
thx
On Mon, Jan 23, 2012 at 8:24 PM, David Pilato david@pilato.fr wrote:
Hi Shairon,
Highlighting attachments works fine for me.
Its highlight the content of my base64 encoded files.
What version do you use (ES and mapper-attachment-plugin) ?
De : elasticsearch@googlegroups.com [mailto:elasticsearch@googlegroups.com]
De la part de Shairon Toledo
Envoyé : lundi 23 janvier 2012 22:56
À : elasticsearch@googlegroups.com
Objet : mapper-attachments and highlights
Hi guys,
I got ES with mapper-attachments plugin running here, I've used this mapping
to the plugin
{
"doc" : {
"properties" : {
"attachment" : {"type" : "attachment", "store" : "yes", "term_vector"
: "with_positions_offsets" }
}
}
}
The doc
{
'filename':'Redis manual.pdf',
'size':61952,
'folder':'/Users/shairon/References',
'updated_at':'2011-12-07T22:02:33Z',
'modified':'2011-12-07T22:02:33Z',
'attachment' : '...JVBERi0xLjMKJcTl8uXrp/Og...base64'
}
I search by
{
"query":{
"term" : { "attachment": "redis"}
},
"highlight" : {
"fields" : {
"attachment" : {}
}
}
}
I get the document properly, the highlight entry is
"highlight":{"filename":["Redis manual.pdf"] }
I see that ES returns _source of the doc so the field attachment is still a
encoded content, I was expecting the tika extracted content in text/plain.
The question is, is there any way to get highlights as decoded text?
--
[ ]'s
Shairon Toledo