dzenzzz commited on
Commit
ce8a5fa
·
1 Parent(s): b019d23

removes v1 search

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -11,17 +11,17 @@ login(HUGGING_FACE_API_KEY)
11
 
12
  app = FastAPI()
13
 
14
- doc_searcher = DocSearcher(collection_name=COLLECTION_NAME)
15
  doc_searcher_v2 = DocSearcherV2(collection_name=COLLECTION_NAME)
16
 
17
  ALLOWED_API_KEY = str(API_KEY)
18
 
19
- @app.get("/api/search")
20
- async def search(q: str, type: int, lt: str | None = None, offset: int = 0):
21
- query = q.lower()
22
- xss = nh3.clean(query)
23
- data = await doc_searcher.search(text=xss,type=type,law_type=lt,offset=offset)
24
- return data
25
 
26
  @app.get("/api/v2/search")
27
  async def v2_search(q: str):
 
11
 
12
  app = FastAPI()
13
 
14
+ # doc_searcher = DocSearcher(collection_name=COLLECTION_NAME)
15
  doc_searcher_v2 = DocSearcherV2(collection_name=COLLECTION_NAME)
16
 
17
  ALLOWED_API_KEY = str(API_KEY)
18
 
19
+ # @app.get("/api/search")
20
+ # async def search(q: str, type: int, lt: str | None = None, offset: int = 0):
21
+ # query = q.lower()
22
+ # xss = nh3.clean(query)
23
+ # data = await doc_searcher.search(text=xss,type=type,law_type=lt,offset=offset)
24
+ # return data
25
 
26
  @app.get("/api/v2/search")
27
  async def v2_search(q: str):