Fixing errors due to relationships

- Fix research for relationships
- Fix sorting for relationships
- Setting 'filter' default value to str to handle JSON serializable error