In my fields settings for this index, to keep things simple for now, I have only checked the box for Title. For the Type I have selected Fulltext. If I clear the index and re-index, then try a search, the search does not turn up any results and I see "An error occurred while executing the search". The log shows this error:
SearchApiException while executing a search: Trying to search on field description which is no indexed fulltext field. in SearchApiQuery->fields() (line 560 of /opt/staging/staging.tmei.org/public/sites/all/modules/contrib/search_api/includes/query.inc).
What does this piece of language mean: "Trying to search on field description which is no indexed fulltext field". What is a no indexed fulltext field?
I do have a field (actually it's a property) with the machine name "description", but I am not checking the box to index that field. Though I also tried checking the index box for the "description" field (with Type set to Fulltext and also with Type set to String) and I get the SearchAPIException error regardless.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2576265-2--views_fulltext_only_existing_fields.patch | 814 bytes | drunken monkey |
|
Comments
Comment #2
drunken monkeyThis means that, internally, you try to search on the field
description
even though it is not indexed, or not indexed as "Fulltext" (the former in your case). You probably (I'm guessing) had indexed it previously, created a view with a fulltext filter for the index and selected that field as one to be searched and then removed the field from the index again.Re-saving the "Search: Fulltext search" filter of the view should solve this, but I guess we should also check for this case ourselves and do something about it. So, please try out whether the attached patch also solves your problem (without re-saving the filter settings)!
Comment #3
drunken monkeyLooks harmless enough to commit without independent testing. So, committed.