Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixos-search
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d3230c03c8f8
Choose a base ref
...
head repository: NixOS/nixos-search
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: da7fd9421f37
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Feb 7, 2021

  1. Filter on buckets only when there is some bucket selected

    otherwise the query is malformed
    garbas committed Feb 7, 2021

    Verified

    This commit was signed with the committer’s verified signature.
    sxzz Kevin Deng 三咲智子
    Copy the full SHA
    da7fd94 View commit details
Showing with 9 additions and 3 deletions.
  1. +9 −3 src/Search.elm
12 changes: 9 additions & 3 deletions src/Search.elm
Original file line number Diff line number Diff line change
@@ -1095,9 +1095,15 @@ makeRequestBody query from sizeRaw sort type_ sortField otherSortFields bucketsF
, Json.Encode.object
[ ( "filter"
, Json.Encode.list Json.Encode.object
[ filterByType type_
, filterByBuckets
]
(List.append
[ filterByType type_ ]
(if List.isEmpty filterByBuckets then
[]

else
[ filterByBuckets ]
)
)
)
, ( "must"
, Json.Encode.list Json.Encode.object