-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date filters #240
base: main
Are you sure you want to change the base?
Date filters #240
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Reviewed everything up to f87c709 in 2 minutes and 15 seconds
More details
- Looked at
396
lines of code in5
files - Skipped
1
files when reviewing. - Skipped posting
9
drafted comments based on config settings.
1. graphiti_core/search/search_filters.py:42
- Draft comment:
Ensure that thefilter_query
string starts with a space or is empty to avoid leading 'AND' in the query. Consider initializingfilter_query
with a space or handling the first condition separately. - Reason this comment was not posted:
Confidence changes required:80%
Thesearch_filter_query_constructor
function insearch_filters.py
constructs a query string by appending conditions with 'AND'. This can lead to a malformed query if the first condition is added without a preceding space or if no conditions are added at all, resulting in a leading 'AND'.
2. graphiti_core/search/search_utils.py:150
- Draft comment:
Includefilter_query
in thecypher_query
to ensure that the constructed filter conditions are applied to the search results. - Reason this comment was not posted:
Comment looked like it was already resolved.
3. graphiti_core/search/search_utils.py:202
- Draft comment:
Ensurefilter_query
is included in thecypher_query
to apply the constructed filter conditions to the search results. - Reason this comment was not posted:
Marked as duplicate.
4. graphiti_core/search/search_utils.py:262
- Draft comment:
Ensurefilter_query
is included in thecypher_query
to apply the constructed filter conditions to the search results. - Reason this comment was not posted:
Marked as duplicate.
5. graphiti_core/graphiti.py:629
- Draft comment:
Avoid using 'filter' as a variable name since it's a reserved keyword in Python. Consider renaming it to something like 'search_filter'. - Reason this comment was not posted:
Confidence changes required:80%
The variable name 'filter' is a reserved keyword in Python. It's better to use a different name to avoid any potential conflicts or confusion.
6. graphiti_core/graphiti.py:689
- Draft comment:
Avoid using 'filter' as a variable name since it's a reserved keyword in Python. Consider renaming it to something like 'search_filter'. - Reason this comment was not posted:
Confidence changes required:80%
The variable name 'filter' is a reserved keyword in Python. It's better to use a different name to avoid any potential conflicts or confusion.
7. graphiti_core/search/search.py:68
- Draft comment:
Avoid using 'filter' as a variable name since it's a reserved keyword in Python. Consider renaming it to something like 'search_filter'. - Reason this comment was not posted:
Confidence changes required:80%
The variable name 'filter' is a reserved keyword in Python. It's better to use a different name to avoid any potential conflicts or confusion.
8. graphiti_core/search/search.py:139
- Draft comment:
Avoid using 'filter' as a variable name since it's a reserved keyword in Python. Consider renaming it to something like 'search_filter'. - Reason this comment was not posted:
Confidence changes required:80%
The variable name 'filter' is a reserved keyword in Python. It's better to use a different name to avoid any potential conflicts or confusion.
9. graphiti_core/search/search_utils.py:139
- Draft comment:
Avoid using 'filter' as a variable name since it's a reserved keyword in Python. Consider renaming it to something like 'search_filter'. - Reason this comment was not posted:
Confidence changes required:80%
The variable name 'filter' is a reserved keyword in Python. It's better to use a different name to avoid any potential conflicts or confusion.
Workflow ID: wflow_oQGvkPFmpVe0gtBC
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on 4abf90d in 21 seconds
More details
- Looked at
55
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. graphiti_core/search/search_filters.py:21
- Draft comment:
Since Python 3.11,LiteralString
is available in the standardtyping
module. Consider importing it from there instead oftyping_extensions
. - Reason this comment was not posted:
Confidence changes required:50%
The import ofLiteralString
fromtyping_extensions
is unnecessary since Python 3.11 supportsLiteralString
in the standardtyping
module.
2. graphiti_core/search/search_filters.py:15
- Draft comment:
Thesearch_filter_query_constructor
function contains repetitive code for handling date filters. Consider refactoring to reduce repetition and improve maintainability. - Reason this comment was not posted:
Confidence changes required:80%
The code insearch_filter_query_constructor
is repetitive, especially in handling date filters. This violates the DRY principle.
Workflow ID: wflow_odwhPW7AiGvvxOi5
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on ed4ccc8 in 17 seconds
More details
- Looked at
86
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. graphiti_core/search/search.py:66
- Draft comment:
Update the parameter name in the docstring to 'search_filter' for consistency with the code.
search_filter: SearchFilters,
- Reason this comment was not posted:
Confidence changes required:50%
The parameter name 'filter' was changed to 'search_filter' in multiple places for clarity. However, in the 'search' function in 'search.py', the parameter name was not updated in the docstring, which could lead to confusion.
2. graphiti_core/graphiti.py:626
- Draft comment:
The variable namefilter
was changed tosearch_filter
for clarity and to avoid using a reserved keyword. This change is consistent and improves code readability. Ensure this change is applied consistently across the codebase. - Reason this comment was not posted:
Confidence changes required:50%
The variable name 'filter' was changed to 'search_filter' in multiple places for clarity and to avoid using a reserved keyword. This change is consistent and improves code readability.
3. graphiti_core/search/search.py:65
- Draft comment:
The variable namefilter
was changed tosearch_filter
for clarity and to avoid using a reserved keyword. This change is consistent and improves code readability. Ensure this change is applied consistently across the codebase. - Reason this comment was not posted:
Confidence changes required:50%
The variable name 'filter' was changed to 'search_filter' in multiple places for clarity and to avoid using a reserved keyword. This change is consistent and improves code readability.
Workflow ID: wflow_yaDrItOuXdywWrWV
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Important
Adds date filtering to search operations using a new
SearchFilters
class, integrated into search functions across the codebase.SearchFilters
class insearch_filters.py
for date-based filtering.search()
and_search()
ingraphiti.py
to acceptfilter
parameter of typeSearchFilters
.search()
insearch.py
to includefilter
parameter in search operations.edge_fulltext_search()
,edge_similarity_search()
, andedge_bfs_search()
insearch_utils.py
to apply date filters usingsearch_filter_query_constructor()
.filter
parameter toedge_search()
insearch.py
to incorporate date filtering.client.py
.This description was created by for ed4ccc8. It will automatically update as commits are pushed.