Users can perform advanced searches (there are many possible parameters):
/search/?query=toto&topic=12&minimumPrice=0&maximumPrice=1000
I would like to save the search parameters (after /search/?) for email alerts.
I have 2 options:
- Saving the raw query (
query=toto&topicId=12&minimumPrice=0&maximumPrice=1000) in a table with a structure of type id, parameters. - Saving a query in a structured table identifier, query, topicId, minimumPrice, maximumPrice, etc.
Each solution has its pros and cons. Of course, solution 2 is cleaner, but is it really worth the effort?
If you have already implemented such a solution and experienced its maintenance, what is the best solution?
The best solution should be the best for every dimension:
- Rigidity
- Fragility
- Viscosity