This issue appears to be reported by multiple users over in the Post Installation support areas so I am logging it as a bug.
This issue occurs using Solr 3.6.1-0
When I add aggregate fields and attempt to use them on a View with the "Search: Fulltext search" filter, the aggregate fields show as blank lines and will actually throw errors when attempting a search using an exposed filter: "Notice: Undefined index: search_api_aggregation_2 in SearchApiViewsHandlerFilterFulltext->getFulltextFields() (line 125 of \sites\all\modules\search_api\contrib\search_api_views\includes\handler_filter_fulltext.inc)."
Changing the search server to use Database resolves this issue so this looks like an issue with the Solr integration specifically. I do not, however, have the technical expertise with Solr to troubleshoot the issue and cannot simply switch to using the Database Server since you lose the ability to use the "Or" function in FacetAPI.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | Filter Solr.png | 22.86 KB | Deadmoon13 |
Comments
Comment #1
drunken monkeyCould you please link to these reports, or direct those users to this issue?
Aggregated fields aren't supposed to be display-able in Views, they can only be searched. So if that's what you mean with "the aggregate fields show as blank lines", then this is expected behavior.
I'm also almost entirely sure that a service class cannot cause the notice you quote. That system is entirely separate from the server. Maybe you just need to clear the cache or something – I'm not sure how this error can happen at all, but it seems caching is the only real possibility here.
Comment #2
Deadmoon13 commentedThanks for the fast response. Quick note, you post a lot of great info on here that I have used more than once during this project. I really appreciate it.
I am using the field for search, not display. (i.e using it as an Exposed Filter in a view)
Let me attach a screenshot to illustrate. Where the long box is under Searched fields, my Fulltext fields should be displayed (i.e Title Fulltext... etc). When I point my search index to Database rather than Solr, the fields are actually displayed.
As a work around, I seem to be able to setup aggregate fields while pointed to Database server rather than index and then point the index at Solr.
Any thoughts?
Comment #3
drunken monkeyOh, OK, thanks for clarifying. However, I'm still exactly as stumped as before – as far as I know, there should be no way at all that the server type would influence that part of the Views integration. Also, the bug itself is rather strange, it seems a field that is clearly there isn't returned by
getFields(). Not even caching would really explain that (especially when all fields are affected, not just aggregated ones), but it's still my best bet. Did you try clearing the cache when this bug happens?Other than that, I have really no idea, I'm sorry. I also can't reproduce this locally, so you'd have to do the debugging if nothing helps and you need to get to the bottom of this.
Comment #4
legolasboThis issue has not seen activity in over 2,5 years. I am therefore closing this issue to clean up the issue queue. Feel free to re-open and update this issue if you feel this issue is still relevant and of importance.