I tried to get the regionbound clustering working with Search Api, but it is only working with a normal view.

Steps to reproduce:

1. Create a content type with a numeric field (I just made a field with the content defaulting to 1)
2. Set up search api to index this field
3. Create a view of type Search Index
4. Set the "Field to perform aggregation on" under Cluster aggregation to your numeric field
5. Set Aggregation to "Sum"
6. If you display the numeric field on the map, you clearly see a 1 for every result you get, so the values are there to aggregate.

But instead of getting the fields to aggregate, all I see is 0 as the result of the aggregation ("aggregationValue":0, in the source code, so it clearly doesn't compute). If I setup a normal view, I get the correct aggregation results, so it is clear that the aggregation somehow doesn't work with Search Api.

Would be great if search api could be supported as well!

Comments

RdeBoer’s picture

Thanks @helioglobal for your report.

I hope to look into this, this weekend.

Best,
Rik

  • RdeBoer committed b93ce47 on 7.x-1.x
    First stab at fixing cluster aggregation for Search API [#2506271]
    
RdeBoer’s picture

@heliogabal,
I've had a stab at this. I can't test properly, as I don't have a full Solr+Search API test rig at the moment.
Please give today's IPGV&M 7.x-1.x-dev ago and let me know if you get any error messages.
Thanks!
Rik

RdeBoer’s picture

Any joy?
Rik

heliogabal’s picture

Hi Rik,
sorry for getting back to you so late, been away from keyboard for some days and had to catch up afterwards, but I appreciate you looking into it very much!

Unfortunately, I had no luck with the latest dev-version either, I installed it, cleared cache, but I still get "aggregationValue":0, in the source code. No idea what else I could do to help you fix this, there are no error messages, nothing breaks, it just doesn't work.

Let me know if I can test something or you would need access to my installation to have a look at it yourself, if that helps.

heliogabal’s picture

Status: Active » Closed (fixed)

Hi Rik,

I tested your latest work on this and would say that Search API views regionbound cluster aggregation is working now!

thanks a lot!

RdeBoer’s picture

Great!

Thanks for confirming!

Sorry I forgot to mention the latest IPGV&M update here, although I did mention it to you by email.

Rik