Skip to main content

Hello, I’m extracting data from the List Analytics endpoint. However, I’m noticing something odd whenever the eventType is ‘search’

For every search event, I’m getting several rows with the same searchId and different numberOfResults values

{
'type': 'search',
'eventType': 'search',
'eventDate': '2022-02-13T07:17:31.546+0000',
'user': <user email>,
'properties': {
'searchId': <search ID>,
'searchTerms': <search terms>,
'source': 'UI',
'numberOfResults': '2'
}
}
{
'type': 'search',
'eventType': 'search',
'eventDate': '2022-02-13T07:17:31.546+0000',
'user': <user email>,
'properties': {
'searchId': <search ID>,
'searchTerms': <search terms>,
'source': 'UI',
'numberOfResults': '11'
}
}
{
'type': 'search',
'eventType': 'search',
'eventDate': '2022-02-13T07:17:31.546+0000',
'user': <user email>,
'properties': {
'searchId': <search ID>,
'searchTerms': <search terms>,
'source': 'UI',
'numberOfResults': '5'
}
}

Only numberOfResults is varying in those rows. Is this a duplicate bug, or this does this field have a special meaning that is making these rows as different events? How should I interpret it?

Hi @idevi97 

Thanks for the great question!

If you are seeing the same searchId come back multiple times, that’s because it is searching across multiple collections that the user has access to. So in your example above, there are 2 results when the user searched against collection A, 11 results when they searched against collection B, and 5 results when they searched across collection C. 

If you wanted to get the total number of results, you’d just have to sum up numberOfResults by searchId.

Let me know if this helps!

Thanks!

Joe


Reply