Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

copy_to not working as expected #216

Closed
sikron opened this issue May 14, 2016 · 1 comment
Closed

copy_to not working as expected #216

sikron opened this issue May 14, 2016 · 1 comment

Comments

@sikron
Copy link

sikron commented May 14, 2016

Hi,
i am using Elasticsearch 2.3.2 with the Mapper Attachments Plugin. I try to copy the extracted content to another field, as described here
This is not working for me, though.

I also found a closed bug here. But the discussion does it not make clear, whether the bug has been resolved or not.

Therefore i would be happy, if you could give me a definitive answer, whether this is possible or not.

My repro-sequence is this:

curl -XPOST 'http://localhost:9200/test' -d '{
"entry": {
"properties": {
"file": {
"type": "attachment",
"fields": {
"content": {
"type": "string",
"copy_to": "fulltext_en"
}
}
},
"fulltext_en": {
"type": "string",
"analyzer": "english"
}
}
}
}'

curl -XPOST 'http://localhost:9200/test/entry' -d '{
"file": "TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQ="
}'
// the base64 is "Lorem ipsum dolor sit amet"

curl -XPOST 'http://localhost:9200/test/_search' -d '
{
"query": {
"match": {
"fulltext_en": "ipsum"
}
}
}'

@dadoonet
Copy link
Member

Closing as answered in Elasticsearch repo.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants