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
Add streams:subscribed
search operand
#13052
Comments
Hello @zulip/server-search members, this issue was labeled with the "area: search" label, so you may want to check it out! |
@zulipbot claim |
Hello @thedeveloperr, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 14 days. You can reclaim this issue or claim any other issue by commenting Thanks for your contributions, and hope to see you again soon! |
@zulipbot claim |
Hello @thedeveloperr, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 14 days. You can reclaim this issue or claim any other issue by commenting Thanks for your contributions, and hope to see you again soon! |
Still working on it. |
@zulipbot claim |
Hello @thedeveloperr, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 14 days. You can reclaim this issue or claim any other issue by commenting Thanks for your contributions, and hope to see you again soon! |
@zulipbot claim Will resume my work on it. |
Hello @thedeveloperr, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 14 days. You can reclaim this issue or claim any other issue by commenting Thanks for your contributions, and hope to see you again soon! |
Still working on it. |
@timabbott Can i work on it. |
@tushar912 hi feel free to pick it up. I was intially responsible for this issue but due to some personal issues I can't devote time to it. Please feel free to ping me on chat.zulip.org for any questions. Happy to help 😃 |
@thedeveloperr Thanks . I will start work on it. |
Hello @tushar912, you claimed this issue to work on it, but this issue and any referenced pull requests haven't been updated for 10 days. Are you still working on this issue? If so, please update this issue by leaving a comment on this issue to let me know that you're still working on it. Otherwise, I'll automatically remove you from this issue in 4 days. If you've decided to work on something else, simply comment Thank you for your valuable contributions to Zulip! |
@zulipbot still working |
Added join_with_usermessage function and use it in get_base_query_for_search to generate query for the user_message case. Fixes zulip#13052
Added join_with_usermessage function and use it in get_base_query_for_search to generate query for the user_message case. Fixes zulip#13052
…c_to_subscribers This function is used to get subscribed streams according to whether history is public to subscribers or not . Fixes zulip#13052
…c_to_subscribers This function is used to get subscribed streams according to whether history is public to subscribers or not . Fixes zulip#13052
…c_to_subscribers This function is used to get subscribed streams according to whether history is public to subscribers or not . Fixes zulip#13052
Following #12999 (which completes #8859), we should also add the planned
streams:subscribed
search operator. This is a somewhat awkward thing to implement, in large part because we don't have existing search queries with an OR gate between items with a UserMessage row or not, and this will violate our search base-then-add-conditions query archictecture. I think the operator should do the following:get_base_query_for_search
to use a newjoin_with_usermessage
function to create theneed_message and need_usermessage
case; we'll reuse this function later. If this can't be done without regressing, we don't have to, but the this should help us be confident that the below flow works.search_recipient_ids
andfull_history_recipient_ids
, partitioning the recipient IDs for the user, depending on whether history is available to you, and use them to createsubscribed_recipient_cond
andfull_history_recipient_cond
.ok_to_include_history=True
so we get just the message caseuser_message_query = join_with_usermessage(message_query)
(wheremessage_query
is whatever is passed in to theby_streams
function). The purpose here is to ensure that any operators processed already apply to both code paths.query = or_(user_message_query.where(subscribed_recipient_cond)), message_query.where(full_history_recipient_cond)
.Tagged as difficult just because this will take significant care especially in unit tests, but I think @thedeveloperr should be able to make it work given his past work :).
The text was updated successfully, but these errors were encountered: