File tree 1 file changed +4
-8
lines changed
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -205,10 +205,9 @@ def filters
205
205
# (type 2 will only be used for dates)
206
206
filters = fields . map { |f | f . split ( @@filter_separator , 3 ) }
207
207
filters . each do |filter |
208
- # NESTED matching
208
+ # filter aggregation with nesting
209
209
if filter [ 0 ] . include? ( "[" )
210
- options = JSON . parse ( f )
211
- original = options [ 1 ]
210
+ original = filter [ 0 ]
212
211
facet = original . split ( "[" ) [ 0 ]
213
212
path = facet . split ( "." ) . first
214
213
condition = original [ /(?<=\[ ).+?(?=\] )/ ]
@@ -217,17 +216,14 @@ def filters
217
216
# this is a nested field and must be treated differently
218
217
nested = {
219
218
"nested" => {
220
-
221
219
"path" => path ,
222
220
"query" => {
223
221
"bool" => {
224
222
"must" => {
225
- "terms " => {
223
+ "term " => {
226
224
# "person.name" => "oliver wendell holmes"
227
225
# Remove CR's added by hidden input field values with returns
228
- facet => filter [ 1 ] . gsub ( /\r / , "" ) ,
229
- # "person.role" => "judge"
230
- subject => predicate
226
+ facet => filter [ 1 ] . gsub ( /\r / , "" )
231
227
}
232
228
}
233
229
}
You can’t perform that action at this time.
0 commit comments