I am working with a federated search system and ha...
# community-help
d
I am working with a federated search system and have two collections with different schema names. I want to perform a federated search where the common search parameter (
query_by
) is mapped to different fields in each collection. Here is an example of my search requests:
Copy code
Gsearch_requests = {
  'searches': [
    {
      'collection': 'products',
      'q': 'shoe',
      'filter_by': 'price:=[50..120]'
    },
    {
      'collection': 'brands',
      'q': 'Nike'
    }
  ]
}
I want to use a common search parameter, but it should map to different fields in each collection. For example:
Copy code
ucommon_search_params = {
    'query_by': {
        'products': 'name',
        'brands': 'brand_name'
    }
}
Is it possible to achieve this in a federated search setup? If so, how can I structure my search requests to handle this mapping?