I think the main problem here is that you did not store your file field.
"file" : { "term_vector":"with_positions_offsets", "store":"yes" }
Here is the query I'm sending
{
"fields":
["_name","title","summary_id"],
"query": {
"multi_match":
{
"query":"test",
"fields": ["file","title"]
}
},
"size":50,
"highlight" : {
"fields" : {
"file": {
"fragment_size" : 200 ,
"number_of_fragments" : 10
}
}
}
}
On Wednesday, September 11, 2013 3:18:28 PM UTC-5, David Pilato wrote:
Once again, it's hard to tell without a full curl recreation.
You did not send the query.
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 11 sept. 2013 à 21:46, Andrew Soep sir...@gmail.com a écrit :
David, sorry about that. You were right, it was an issue with the query it seems.
But I have another issue now. I'm getting a lot of highlight results now. The problem is, when they come back, they are still base64 encoded. When I base64_decode them, instead of getting back text, I get back what seems to be raw document data.
So for example, this is a result I get.
ZyktKVlqpV+fnvzpB6vPT8TkrYxWr/YTX/75iVz9RW1mlFgpIwBa8Gr15Z+d/OYDaB2EcSGs9hPYOrdUKioYlhIi/zQ4AGVirGkLY6JqZxmstcbF1X5iH2w/vrPaifGy+5W7IdBOaAvk3E90oBHWNo0qg8XBjjDTLwD5EQAFYkeF2O8mAGgFsx3wHPBv4AGgXOEfHE7M
And when I base64_decode this, I get something along the lines of:
zg%jË!Š eŠ mÐÏ ýé¸(lF¸@ €À?¿Â@ €0À @ ˜@@ X@@! !X!˜!Ø" "X"˜"Ø# #X#˜#Ø$ $X$˜$Ø% %X%˜
Any ideas? Am I missing something?
On Wednesday, September 11, 2013 12:44:20 AM UTC-5, David Pilato wrote:
Please answer to the mailing list and not to personnal email.
I don't see a big difference. Just wondering about path.
Could send your query as well or best GIST a full curl recreation?
May be there is something wrong in your query.
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 11 sept. 2013 à 06:46, Andrew Soep sir...@gmail.com a écrit :
Hey David,
I appreciate the response. I asked this question a while back, and got a similar response, but I don't see what's different about my mapping? When I store attachments, they index, but highlighting never seems to work. Is there anything you see in my mapping that might be causing this?
On Mon, Sep 9, 2013 at 11:54 PM, David Pilato da...@pilato.fr wrote:
Hey Andrew,
Have a look here: Test of attachments plugin · GitHub
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 10 sept. 2013 à 01:04, Andrew Soep sir...@gmail.com a écrit :
I've been struggling with getting highlighting to work with attachments. I've tried a number of different mappings, and I'm not sure what I'm doing wrong. I can't imagine that anything else is causing the issue. I've compared to other mappings that people have posted that supposedly allow attachment highlighting, to no avail. Hoping someone can provide some help, as I've been struggling with this for a while. Mapping is below:
{
"doc" : {
"properties" : {
"_content_type" : {
"type" : "string"
},
"_name" : {
"type" : "string"
},
"file" : {
"type" : "attachment",
"path" : "full",
"fields" : {
"file" : {
"type" : "string",
"term_vector" : "with_positions_offsets"
},
"author" : {
"type" : "string"
},
"title" : {
"type" : "string",
"analyzer" : "english"
},
"name" : {
"type" : "string"
},
"date" : {
"type" : "date",
"format" : "dateOptionalTime"
},
"keywords" : {
"type" : "string",
"analyzer" : "keyword",
"store" : "yes"
},
"content_type" : {
"type" : "string"
}
}
},
"summary_id" : {
"type" : "string"
},
"title" : {
"type" : "string",
"analyzer" : "english"
}
}
}
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elasticsearch/I37bUApGBNQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elasticsearc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.