This is building the query dictionary.  We're splitting our key and value and assigning them to tag-key and tag-value to handle the split tags to get around the 255 character limit.  If tag-key or tag-value isn't defined, define it with the key or value.  If it is already defined (multiple search terms), append it rather than overwrite.