Skip to content
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

Refined Searching #136

Open
TylerBloom opened this issue Jun 30, 2020 · 4 comments
Open

Refined Searching #136

TylerBloom opened this issue Jun 30, 2020 · 4 comments

Comments

@TylerBloom
Copy link

I have not been able to just quote a rule without any subrules (ie. 614.1a,b,c...). For example, if I want to quote CR 614.1, I can't use !cr 614.1. to only quote that rule and none of its subrules. Quoting entire sections like this is very useful at times but it is often deleterious to the conversation.

This might be an issue with the source that is being searched against. I've noticed that the txt version of the CR includes a period at the end of each rule (not subrule), but the version on blogs.magicjudges.org does not. Using the same example as before, the text version of the CR will have "614.1." as a rule number while the online version will just have "614.1". Both sources will have "614.1a" as a rule number for that subrule, though.

Using this subtle difference might be useful in allowing for the quoting of rules without their subrules. A search for "614.1." would only return that rule while a search for "614.1" would return that rule and all of its subrules.

@KingSupernova31
Copy link

The period distinction is nice and easy, but I worry that people might not realize it's relevant, include or omit it by accident, and be confused when the results aren't what they'd expect.

On the other hand, this is the same system that RulesGuru uses to differentiate between "include subrules" and "this rule only" in its searches. The fact that you and I both arrived at that system independently might be a decent indication that it's fairly intuitive.

@TylerBloom
Copy link
Author

TylerBloom commented May 4, 2021

I have a PR out for this issue, #147 .

I think the period at the end is a small but fairly intuitive way to handle this, though I am open to other ideas.

@colacadstink
Copy link

Any updates/progress on this? Just ran into this issue today trying to quote !cr 614.12, and got all the subrules with it.

@multimeric
Copy link
Collaborator

Okay apologies about the delay replying to this. I'm happy to make a distinction between "include all subrules" and "don't include subrules", but with the move to slash commands I'd like to make this explicit. I'm thinking we could just have a boolean option includeSubrules which does exactly that. The period syntax is concise, yes, but it's a bit too magic, and slash commands give us a nice UI for doing this. So I think we would accept a PR that works in this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants