Skip to content

Commit

Permalink
facets filter fixed with ES as backend
Browse files Browse the repository at this point in the history
  • Loading branch information
hmuniz committed Oct 1, 2019
1 parent 505cc82 commit 8aee9bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ returns the first entry in word_en."
(when lex-file (mapcar (lambda (x) `("wn30_lexicographerFile" ,x)) lex-file))
(when word-count-pt (mapcar (lambda (x) `("word_count_pt" ,x)) word-count-pt))
(when word-count-en (mapcar (lambda (x) `("word_count_en" ,x)) word-count-en))
(when frame (mapcar (lambda (x) `("wn_frame" ,x)) frame))))
(when frame (mapcar (lambda (x) `("wn30_frame" ,x)) frame))))
(result (clesc:es/search "wn"
:text (unless (equal "all" search-field) term)
:search-field (unless (equal "all" search-field) search-field)
Expand All @@ -227,7 +227,7 @@ returns the first entry in word_en."
(facets (mapcar #'(lambda (buckets)
(if (listp buckets)
(mapcar (lambda (bucket)
(list :|name| (getf bucket :|key|)
(list :|name| (format nil "~a" (getf bucket :|key|))
:|count| (getf bucket :|doc_count|)))
(getf buckets :|buckets|))
buckets))
Expand Down

0 comments on commit 8aee9bd

Please sign in to comment.