Should fix no result found by ES
Cette révision appartient à :
Parent
b4add6054a
révision
fb64d13e29
2 fichiers modifiés avec 3 ajouts et 3 suppressions
|
@ -135,11 +135,11 @@ func (p *TorrentParam) ToFilterQuery() string {
|
|||
for key, val := range p.Category {
|
||||
if val.IsSubSet() {
|
||||
conditionsOr[key] = "(category: " + strconv.FormatInt(int64(val.Main), 10) + " AND sub_category: " + strconv.FormatInt(int64(val.Sub), 10) + ")"
|
||||
} else if val.IsMainSet() {
|
||||
} else {
|
||||
conditionsOr[key] = "(category: " + strconv.FormatInt(int64(val.Main), 10) + ")"
|
||||
}
|
||||
}
|
||||
query += strings.Join(conditionsOr, " OR ")
|
||||
query += "(" + strings.Join(conditionsOr, " OR ") + ")"
|
||||
}
|
||||
|
||||
if p.UserID != 0 {
|
||||
|
|
|
@ -26,7 +26,7 @@ func ConvertToCat(cat string) string {
|
|||
|
||||
func convertCat(cat string) string {
|
||||
if cat == "5070" {
|
||||
return "3_13"
|
||||
return "3_5"
|
||||
}
|
||||
|
||||
if len(cat) < 6 {
|
||||
|
|
Référencer dans un nouveau ticket