fish-face/quasselgrep

Queries don't seem to work with general text searches

Closed this issue · 2 comments

I can confirm that searching on a particular network with a particular channel and user works (i.e. searching a postgres database on network NETWORK, channel #test, and user mcswizzle):

[postgres@mcswizzle ~]$  quasselgrep -c ~/.quasselgrep.conf --db postgres --dbhost localhost -u USER -n NETWORK -b "#test" -n mcswizzle
Query completed in 0.01 seconds
[2019-02-05 18:50:41] <mcswizzle> test1
[2019-02-05 18:50:43] <mcswizzle> test2
[2019-02-05 18:50:45] <mcswizzle> test3\
[2019-02-05 18:50:47] <mcswizzle> test4
[2019-02-05 18:50:48] <mcswizzle> test5

However when removing the -n $IRC_NICK parameter and only searching the channel for "test" it cannot find these messages:

[postgres@mcswizzle ~]$  quasselgrep -c ~/.quasselgrep.conf --db postgres --dbhost localhost -u USER -n NETWORK -b "#test" test
Query completed in 0.00 seconds
No results found.

This is also true for a specific database, user, buffer, nick, and specific string (i.e. searching for the word "null" by user "allie" in "#channel") works:

[postgres@mcswizzle ~]$ quasselgrep -c ~/.quasselgrep.conf --db postgres --dbhost localhost -u USER -n NETWORK -b "#channel" -n allie null
Query completed in 2.06 seconds
[2019-02-05 19:03:33] <allie> mcswizzle: grep for a null string?

But not that same channel simply looking for the word "null":

[postgres@mcswizzle ~]$ quasselgrep -c ~/.quasselgrep.conf --db postgres --dbhost localhost -u USER -n NETWORK -b "#channel" null
Query completed in 2.06 seconds
No results found.

I believe the problem is that you have -n NETWORK but it should be -N NETWORK. When you include the -n <nick parameter you are overriding a search for messages sent by someone with nick NETWORK - and presumably no-one has a nick matching the name of the IRC network in question, so when you don't include the extra parameter, you get nothing back.

Thanks, you're completely right. Closing this!