我有一个索引,网址,如下所示:
path: {
type: "string"
},
@timestamp: {
type: "date",
format: "strict_date_optional_time||epoch_millis"
},
该路径将存储来自 url 的 PATH 部分,例如:
https://facebook.com/profile/photos/album/1
将存储为:
/profile/photos/album/1
我正在存储各种路径,所以可能更像:
/profile/photos/album/1
/profile/photos/album/2
/profile/photos/album/2
/profile/photos/album/2
/profile/friends/1
/profile/friends/2
/newsfeed/me/
/newsfeed/me/
/newsfeed/friendName/
我正在尝试找出每个路径具有的唯一网页浏览量。我不确定我应该怎么做,我应该使用正则表达式吗?
我想它看起来像(伪代码):
{
"query": {
"regexp": {
"path": ""
},
"unique": true
}
}