I have an html input that sends the query string through an ajax call to my php server. The search string can be complex and allow for filters, my implementation question looking for feedback is should I handle the parsing of the fields/values on the client side and dynamically add post values or should I handle everything on the server side?
Example: From the search box you could enter things such as
'search string category:sports submitted:today'
Then I could either
javascript submits
(POST) q='search string category:sports submitted:today'
server parses to
query='search string'
category='sports'
submitted'today'
OR
javascript parses and submits
(POST) q='search string'
(POST) category='sports'
(POST) submitted='today'
server handles post parameters
query='search string'
category='sports'
submitted='today'
Depends on how interactive you want your application to be.
IF the client parses it while the user is typing, you could provide auto-fill features and validation.
Else you have to wait for the user to be done and then receive feedback from the server.
Technically it is not a big deal for the server-side to parse. But it just may not be the optimum application behavior.