-
Notifications
You must be signed in to change notification settings - Fork 0
/
curl.txt
76 lines (72 loc) · 1.68 KB
/
curl.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
curl -XGET 'http://localhost:9200/categories/_search?pretty=true' -d '
{
"query" : {
"function_score" : {
"query" : {
"bool" : {
"should" : {
"match" : {
"href.autocathref" : {
"query" : "Some text about baseball"
}
}
}
}
},
"functions" : [ {
"filter" : {
"match" : {
"lowerLast" : "some text about baseball"
}
},
"weight" : 30.0
}, {
"field_value_factor" : {
"field" : "hrefDepth",
"factor" : 10.0,
"modifier" : "reciprocal"
}
} ]
}
},
"fields": ["href"]
}'
curl -XGET 'http://localhost:9200/categories/_search?pretty=true' -d '
{
"query" : {
"function_score" : {
"query" : {
"bool" : {
"must" : {
"prefix": {"href": "/dmoz/Sports"}
},
"should" : {
"multi_match" : {
"query" : "some text about baseball",
"fields" : [ "last.matcher^30", "href.autocathref" ]
}
}
}
},
"functions" : [ {
"field_value_factor" : {
"field" : "hrefDepth",
"factor" : 10.0,
"modifier" : "reciprocal"
}
} ]
}
},
"fields": ["href"]
}'
curl -XGET 'http://localhost:9200/categories/_search?pretty=true' -d '
{
"query" : {
"multi_match" : {
"query" : "some text about baseball",
"fields" : [ "last.matcher^3", "href.autocathref" ]
}
},
"fields": ["href"]
}'
curl -XGET 'http://localhost:8080/bwcat/categories/?q=some+text+about+baseball&pfx=/dmoz/Sports/&href'