depwl9992 / anomalyjobs

Automatically exported from code.google.com/p/anomalyjobs
0 stars 0 forks source link

+jobs/search doesn't handle spaces nicely #152

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. +jobs/search foo bar

What is the expected output?
A list of jobs containing the string "foo bar"

What do you see instead?
Syntax error.

Please use labels and text to provide additional information.
+jobs/search passes its argument directly to +jobs/select. So searching for an 
argument with spaces in it doesn't parse well (it does search=foo and then has 
another argument bar, which isn't valid.)

Easy solution:  Have +jobs/search force +jobs/select "%0".

Hard solution:  allow boolean logic in the search terms:  +jobs/search foo & 
bar --> +jobs/select search="foo" and search="bar"

Leaving this ticket up while I think about whether this is worth the effort to 
parse since it's probably rare and the /select option is already possible and 
doesn't suffer from parsing issues. (What if you want to search for the word 
AND, ferexample.)

Original issue reported on code.google.com by widdis@gmail.com on 17 Feb 2011 at 8:51

GoogleCodeExporter commented 9 years ago
Did the easy solution in r401.  No reason to duplicate the boolean logic; they 
can use +jobs/select.

Original comment by widdis@gmail.com on 24 Feb 2011 at 5:01