Skip to content

Commit

Permalink
fix: Remove unused function as the conversion is done by postgres query
Browse files Browse the repository at this point in the history
  • Loading branch information
whiterabbit1983 committed Jan 13, 2025
1 parent d21f980 commit 8b19c96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions agents-api/agents_api/common/nlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def text_to_tsvector_query(
# Find proximity groups and build query
groups = find_proximity_groups(keywords, keyword_positions, proximity_n)
if groups:
queries.append(" AND ".join([f"({' OR '.join(grp)})" for grp in groups]))
queries.append(" OR ".join([" OR ".join(grp) for grp in groups]))

return queries

Expand Down Expand Up @@ -413,7 +413,7 @@ def batch_text_to_tsvector_queries(
continue
groups = find_proximity_groups(keywords, keyword_positions, proximity_n)
if groups:
queries.append(" AND ".join([f"({' OR '.join(grp)})" for grp in groups]))
queries.append(" OR ".join([" OR ".join(grp) for grp in groups]))

results.append(queries)

Expand Down

0 comments on commit 8b19c96

Please sign in to comment.