Hummm. Strange.
It looks like you cannot use the type name as a property:
Note to Shay: do you think it’s an issue we should track?
If you send:
curl -XPOST 'http://localhost:9200/spokely_development_users/user/3457' -d '
{
"myuser":{
"headline":"Ruby on Rails Engineer"
}
}
'
curl -XGET 'http://localhost:9200/spokely_development_users/user/_search?size=10&pretty=true' -d '
{
"query":{
"filtered":{
"query":{
"query_string":{
"query":"a Ruby on Rail Engineer",
"fields":[
"myuser.headline^2"
]
}
}
}
},
"highlight":{
"fields":{
"fields":{
"myuser.headline":{ }
}
}
},
"size":10
}
'
It will work.
But with:
curl -XPOST 'http://localhost:9200/spokely_development_users/user/3457' -d '
{
"user":{
"headline":"Ruby on Rails Engineer"
}
}
'
curl -XGET 'http://localhost:9200/spokely_development_users/user/_search?size=10&pretty=true' -d '
{
"query":{
"filtered":{
"query":{
"query_string":{
"query":"a Ruby on Rail Engineer",
"fields":[
"user.headline^2"
]
}
}
}
},
"highlight":{
"fields":{
"fields":{
"user.headline":{ }
}
}
},
"size":10
}
'
It’s broken.
Hope this will help you
De : elasticsearch@googlegroups.com [mailto:elasticsearch@googlegroups.com] De la part de Brandon Hilkert
Envoyé : lundi 23 juillet 2012 16:30
À : elasticsearch@googlegroups.com
Objet : Re: Highlight stopped working for me
https://gist.github.com/3163918
On Monday, July 23, 2012 9:56:20 AM UTC-4, David Pilato wrote:
Can you gist a full curl recreation ?
I will try to test it.
David
Twitter : @dadoonet / @elasticsearchfr
Le 23 juil. 2012 à 15:46, Brandon Hilkert brandon@meeteor.com a écrit :
I've confirmed that if I include both associations in my JSON representation when indexing the data, the highlighting breaks for whatever reason.
So with this in my Ruby code:
def to_indexed_json
to_json(include: [:educations, :jobs])
end
Highlighting doesn't work.
However, without that and just sending the root data, highlighting works fine.
Any thoughts on what might cause this?
Thanks,
Brandon
On Monday, July 23, 2012 9:23:05 AM UTC-4, Brandon Hilkert wrote:
Hey David,
The only difference from when it previously worked is the change in data i'm sending with those objects. I make sure I delete the index entirely before every test.
I was going to mess around with the mapping today. Any other ideas?
Brandon
On Sunday, July 22, 2012 11:11:39 PM UTC-4, David Pilato wrote:
Also, are you doing this on a clean index?
Does it remain some old mapping?
David
--
Le 23 juil. 2012 à 05:07, David Pilato david@pilato.fr a écrit :
Did you try to prefix with your type name?
"user.educations.school": {},
Not sure it will help...
David
--
Le 23 juil. 2012 à 04:59, Brandon Hilkert brandon@meeteor.com a écrit :
"educations.school": {},