Highlighting attachments


(Andrew Soep-2) #1

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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(David Pilato) #2

Hey Andrew,

Have a look here: https://gist.github.com/dadoonet/3907010

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 10 sept. 2013 à 01:04, Andrew Soep siraris@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 elasticsearch+unsubscribe@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.


(David Pilato) #3

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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 11 sept. 2013 à 06:46, Andrew Soep siraris@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 david@pilato.fr wrote:

Hey Andrew,

Have a look here: https://gist.github.com/dadoonet/3907010

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 10 sept. 2013 à 01:04, Andrew Soep siraris@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 elasticsearch+unsubscribe@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 elasticsearch+unsubscribe@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.


(Andrew Soep-2) #4

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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 11 sept. 2013 à 06:46, Andrew Soep <sir...@gmail.com <javascript:>> 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<javascript:>

wrote:

Hey Andrew,

Have a look here: https://gist.github.com/dadoonet/3907010

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 10 sept. 2013 à 01:04, Andrew Soep <sir...@gmail.com <javascript:>> 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 <javascript:>.
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 <javascript:>.
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.


(David Pilato) #5

Once again, it's hard to tell without a full curl recreation.
You did not send the query.

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 11 sept. 2013 à 21:46, Andrew Soep siraris@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 :wink:
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: https://gist.github.com/dadoonet/3907010

--
David :wink:
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 elasticsearch+unsubscribe@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.


(Andrew Soep-2) #6

Here is the query I'm sending :slight_smile:

{
"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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 11 sept. 2013 à 21:46, Andrew Soep <sir...@gmail.com <javascript:>> 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 :wink:
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: https://gist.github.com/dadoonet/3907010

--
David :wink:
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 <javascript:>.
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.


(David Pilato) #7

I think the main problem here is that you did not store your file field.
"file" : { "term_vector":"with_positions_offsets", "store":"yes" }

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 11 sept. 2013 à 22:46, Andrew Soep siraris@gmail.com a écrit :

Here is the query I'm sending :slight_smile:

{
"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 :wink:
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 :wink:
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: https://gist.github.com/dadoonet/3907010

--
David :wink:
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.

--
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.


(Andrew Soep-2) #8

That was it David! store: yes solved the problem. Thank you so much!

On Thursday, September 12, 2013 3:47:31 AM UTC-5, David Pilato wrote:

I think the main problem here is that you did not store your file field.
"file" : { "term_vector":"with_positions_offsets", "store":"yes" }

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr
| @scrutmydocs https://twitter.com/scrutmydocs

Le 11 sept. 2013 à 22:46, Andrew Soep <sir...@gmail.com <javascript:>> a
écrit :

Here is the query I'm sending :slight_smile:

{
"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 :wink:
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 :wink:
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: https://gist.github.com/dadoonet/3907010

--
David :wink:
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 elasticsearc...@googlegroups.com <javascript:>.
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.


(system) #9