I commented on this issue but since it's closed not sure if anyone will see it - so I thought I'd open a new issue.

here's my comment:

Since you can't use fulltext fields for facets, I'm a little stumped as to how to create a general search which goes across several aggregated fields. If I use the Search: Fulltext search option in the filter of my view then if the user does multiple words the search works correctly but the facets do not correctly reflect the data.

If I add the aggregated field to my facet fields as a Fulltext type - I get various SQL errors. If I change the aggregated field to a string type my search does not work.

Any suggestions? Thanks,
Elizabeth

Comments

emettler’s picture

I did some followup playing around with this and found:

  • I am using a view based on a Search API index with the filters exposed in the form.
  • I am not trying to do facets on any fields which are of type Fulltext - only those of type String or Taxonomy Term
  • I have fields that I want to to be able to search on (but not facet on) that are FullText - the main body text, short description.
  • I want to be able to do general searches across the site based on Title (which is String so it can be sorted on in the view), Main Body Text, and Short Description.
  • When I use Fulltext search to search the site and use multiple terms - I get the correct results back but the Facets only reflect the first item returned in the search.
  • If I use an aggregated field called search_index(that is of type FullText) on aggregation type Fulltext on a combination of string and fulltext fields, then I do not receive any results.
  • If I set that same aggregated field to type String - then I receive an error message when I try to search

Any suggestions?

emettler’s picture

Title: Revisit of multipel terms for searching » Revisit of multiple terms for searching

Any help on this?

St_B’s picture

Issue summary: View changes

@emettler
Did you have any answer or found something by yourself ?
"When I use Fulltext search to search the site and use multiple terms - I get the correct results back but the Facets only reflect the first item returned in the search."
I have the same problem I think : https://www.drupal.org/node/2272589#comment-8930303

St_B’s picture

this seems to be the solution : https://www.drupal.org/node/1403916

cpliakas’s picture

St_B’s picture

Status: Closed (duplicate) » Active

I m afraid there is still this problem
"If I use an aggregated field called search_index(that is of type FullText) on aggregation type Fulltext on a combination of string and fulltext fields, then I do not receive any results."
I made another issue here, but reopen this one in case you won't see the other which is on search api issues : https://www.drupal.org/node/2299385

cpliakas’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
Category: Support request » Bug report
Status: Active » Postponed (maintainer needs more info)
Issue tags: +Search API

OK, sounds good.

emettler, thanks for posting the original issue and details.

St_B, sounds good. Referencing the issue you mentioned an leaving this open as "maintainer needs more info" in case there is something required in Facet API to facilitate a fix. Also changing to a bug report as I think that is more accurate.

Chris