-
Notifications
You must be signed in to change notification settings - Fork 20
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
Make quote context searchable #210
Comments
Index over |
If you want to make I realise that |
Hmm... I know it's certainly been the case that people tend to get It'd mean we'd lose the ability to find quotes that are by eg Paul rather than about Paul or vice versa, though, and... maybe that's worth it? Also relevant that the search on |
Would it not make some sense to have some switches on findquote The last one feels like its not the right switch for contextual quotes. |
Oh boy, syntax bikeshedding. But first, a request from the chat:
I wrote this thing a long time ago so it needs some work before it can be added to LRRbot. The syntax:
This gist seems to be the parser code. Context, game and show tags need to be added and it should generate a SQLAlchemy query and not a SQL string. Examples:
An alternative to this would be the |
@RebelliousUno, did you imagine being able to chain switches together? e.g. Or did you see them working in the same way as the @andreasots, I don't have a lot of experience with context-free grammars so pardon me if I'm just confused. There doesn't seem to be a way to terminate these rules:
|
You are correct. It should be
|
To go back for just a moment: was the original request to search on just the Combining But is there much demand for searching on more than one column? If there isn’t, I’d be inclined not to risk complicating things. If the aim is just to combine
This is similar what Uno seems to be suggesting and could be updated to use Andreas’ syntax at a later stage. |
The two aliases for quote id and quote name could potentially add extra logic that might be a little hassle. Just in case a name ended up being confused with an id. Personally I'd drop one of the aliases (likely quote name alias) |
As suggested in-chat by dialMforMara, the
context
for quotes should be searchable.It probably should just be treated the same as the actual quote body. Fulltext-index it, and make the normal
!findquote
command (and the "Search quotes" function of the website) search where eitherquote
orcontext
contains the search term.(I think making it so
!findquote foo bar
can find a quote wherequote
contains "foo" andcontext
contains "bar" would be a bit overcomplicated, so I wouldn't be worried about that. Just (pseudocode)quote contains 'foo bar' or context contains 'foo bar'
.)((Unless it's possible to make a single full-text index over both
quote
andcontext
? I don't know enough postgresql to know if that's a thing...))The text was updated successfully, but these errors were encountered: