Skip to content

Commit

Permalink
Update HTTP interface and fix memory leak (infiniflow#1766)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

1.  Update HTTP interface
2.  Fix memory leak

### Type of change

- [x] Refactoring

---------

Signed-off-by: Jin Hai <[email protected]>
  • Loading branch information
JinHai-CN authored Aug 29, 2024
1 parent 3425b11 commit 76dfddf
Show file tree
Hide file tree
Showing 5 changed files with 193 additions and 144 deletions.
4 changes: 2 additions & 2 deletions python/infinity_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,9 @@ def select(self):
if len(self._fusion):
tmp.update({"fusion": self._fusion})
if len(self._knn):
tmp.update({"knn": self._knn})
tmp.update({"match_dense": self._knn})
if len(self._match):
tmp.update({"match":self._match})
tmp.update({"match_text":self._match})
if len(self._match_tensor):
tmp.update({"match_tensor":self._match_tensor})
if len(self._match_sparse):
Expand Down
4 changes: 2 additions & 2 deletions src/network/http/http_search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ void HTTPSearch::Process(Infinity *infinity_ptr,
search_exprs->push_back(fusion_expr);
++fusion_expr_count;
}
} else if (IsEqual(key, "knn")) {
} else if (IsEqual(key, "match_dense")) {
if (search_expr == nullptr) {
search_expr = new SearchExpr();
}
Expand All @@ -158,7 +158,7 @@ void HTTPSearch::Process(Infinity *infinity_ptr,
}
search_exprs->push_back(knn_expr);
++match_expr_count;
} else if (IsEqual(key, "match")) {
} else if (IsEqual(key, "match_text")) {
if (search_expr == nullptr) {
search_expr = new SearchExpr();
}
Expand Down
Loading

0 comments on commit 76dfddf

Please sign in to comment.