Spaces:
Runtime error

dzenzzz commited on
Commit
a41c542
·
verified ·
1 Parent(s): 4345d7f

Update doc_searcher.py

Browse files
Files changed (1) hide show
  1. doc_searcher.py +15 -2
doc_searcher.py CHANGED
@@ -32,7 +32,7 @@ class DocSearcher:
32
  )
33
  ]
34
 
35
- if type == 0 and law_type is not None:
36
  filter = Filter(
37
  must=[
38
  FieldCondition(
@@ -45,7 +45,7 @@ class DocSearcher:
45
  ),
46
  ]
47
  )
48
- elif type == 0:
49
  filter = Filter(
50
  must=[
51
  FieldCondition(
@@ -54,6 +54,19 @@ class DocSearcher:
54
  )
55
  ]
56
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  else:
58
  return []
59
 
 
32
  )
33
  ]
34
 
35
+ if type == 1 and law_type is not None:
36
  filter = Filter(
37
  must=[
38
  FieldCondition(
 
45
  ),
46
  ]
47
  )
48
+ elif type == 1:
49
  filter = Filter(
50
  must=[
51
  FieldCondition(
 
54
  )
55
  ]
56
  )
57
+ elif type == 0 and law_type is not None:
58
+ filter = Filter(
59
+ must=[
60
+ FieldCondition(
61
+ key="tip_dokumenta",
62
+ match=MatchValue(value=type)
63
+ ),
64
+ FieldCondition(
65
+ key="vrsta_akta",
66
+ match=MatchText(text=law_type)
67
+ ),
68
+ ]
69
+ )
70
  else:
71
  return []
72