File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Sources/UnidocQueries/Queries Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 1
1
<div align =" center " >
2
2
3
- <strong ><em ><code >unidoc</code ></em ></strong ><br ><small ><code >0.1.4 </code ></small >
3
+ <strong ><em ><code >unidoc</code ></em ></strong ><br ><small ><code >0.1.5 </code ></small >
4
4
5
5
[ ![ ci build status] ( https://github.com/kelvin13/swift-unidoc/actions/workflows/build.yml/badge.svg )] ( https://github.com/kelvin13/swift-unidoc/actions/workflows/build.yml )
6
6
Original file line number Diff line number Diff line change @@ -71,7 +71,19 @@ extension WideQuery:VolumeLookupQuery
71
71
{
72
72
$0 [ let: id] = Output . Principal [ . master] / Volume. Master [ . id]
73
73
74
- $0 [ let: topic] = Output . Principal [ . master] / Volume. Master [ . group]
74
+ $0 [ let: topic] = . expr
75
+ {
76
+ // For reasons I don’t understand, MongoDB will fail to use any indexes
77
+ // whatsoever for this join if the `group` field isn’t present in the
78
+ // master document. (Which is true of most of them.) The
79
+ // least-intrusive way to fix this is to use an optional-coalescence
80
+ // expression to “evaluate” the missing field to `null`.
81
+ $0 [ . coalesce] =
82
+ (
83
+ Output . Principal [ . master] / Volume. Master [ . group] ,
84
+ Never?? . some( nil )
85
+ )
86
+ }
75
87
$0 [ let: min] = Output . Principal [ . names] / Volume. Names [ . planes_autogroup]
76
88
$0 [ let: max] = Output . Principal [ . names] / Volume. Names [ . planes_max]
77
89
}
You can’t perform that action at this time.
0 commit comments