digitalpoint
Well-known member
I'm wondering if anyone on ES 0.20.2 is able to get posts or threads by a user (from the normal link on their profile)?
I updated ES to 0.20.2 and it seems we lost the ability to search for content by a user... I did some debugging, and it appears ES doesn't support searching indexes/types without specifically calling them out any longer (I can only asume it's an ES bug).
This query yields nothing (search across all indexes, all types)...
According to ES docs, that should work (see last example here): http://www.elasticsearch.org/guide/reference/api/search/indices-types.html
A search across just the xenforo index (all types) returns nothing as well. This one is important because this is how XenForo does it...
But just to prove we have data... if we call out just to search a single type (or even if you search multiple types), it returns results:
I updated ES to 0.20.2 and it seems we lost the ability to search for content by a user... I did some debugging, and it appears ES doesn't support searching indexes/types without specifically calling them out any longer (I can only asume it's an ES bug).
This query yields nothing (search across all indexes, all types)...
Code:
curl -XGET 'http://localhost:9200/_search?q=user:1&pretty=1'
{
"took" : 7,
"timed_out" : false,
"_shards" : {
"total" : 10,
"successful" : 10,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}
}
According to ES docs, that should work (see last example here): http://www.elasticsearch.org/guide/reference/api/search/indices-types.html
A search across just the xenforo index (all types) returns nothing as well. This one is important because this is how XenForo does it...
Code:
curl -XGET 'http://localhost:9200/xenforo/_search?q=user:1&pretty=1'
{
"took" : 8,
"timed_out" : false,
"_shards" : {
"total" : 10,
"successful" : 10,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}
}
But just to prove we have data... if we call out just to search a single type (or even if you search multiple types), it returns results:
Code:
curl -XGET 'http://localhost:9200/_all/post/_search?q=user:1&pretty=1'
{
"took" : 10,
"timed_out" : false,
"_shards" : {
"total" : 10,
"successful" : 10,
"failed" : 0
},
"hits" : {
"total" : 31372,
"max_score" : 1.0,
"hits" : [ {
"_index" : "xenforo",
"_type" : "post",
"_id" : "4797783",
"_score" : 1.0
}, {
"_index" : "xenforo",
"_type" : "post",
"_id" : "5005492",
"_score" : 1.0
}, {
"_index" : "xenforo",
"_type" : "post",
"_id" : "4808667",
"_score" : 1.0
}, {
"_index" : "xenforo",
"_type" : "post",
"_id" : "4799431",
"_score" : 1.0
}, {
"_index" : "xenforo",
"_type" : "post",
"_id" : "5192213",
"_score" : 1.0
}, {
"_index" : "xenforo",
"_type" : "post",
"_id" : "5467205",
"_score" : 1.0
}, {
"_index" : "xenforo",
"_type" : "post",
"_id" : "6632367",
"_score" : 1.0
}, {
"_index" : "xenforo",
"_type" : "post",
"_id" : "6632545",
"_score" : 1.0
}, {
"_index" : "xenforo",
"_type" : "post",
"_id" : "6718061",
"_score" : 1.0
}, {
"_index" : "xenforo",
"_type" : "post",
"_id" : "6719684",
"_score" : 1.0
} ]
}
}