Closed (won't fix)
Project:
Search API Extended String Filter
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
3 Aug 2012 at 18:33 UTC
Updated:
13 Sep 2012 at 12:38 UTC
Jump to comment: Most recent file
Comments
Comment #1
jessepinho commentedFor clarification: I'm trying to use it on the Label field (which correlates to the "title" varchar field in the DB, defined as "text" in hook_entity_property_info()) of my custom entity type.
Looks like line 14 of search_api_string_filter.views.inc only checks "string" type fields, not "text." So I put a dsm($field) call right after line 14 (inside the if{} statement) to see which fields it matched, and it only matched "Content type" and "Item language" fields (which of course isn't very useful for searching purposes).
Any thoughts?
(PS - Changing line 14 to "text" instead of "string" didn't fix the problem, either.)
Comment #2
jessepinho commentedOK, so I tested it on the Item language field, and it's giving me the following error:
PHP Fatal error: Call to undefined method SearchApiViewsQuery::placeholder() in [...]/sites/all/modules/contrib/views/includes/handlers.inc on line 596
I believe this is based on the call to $this->placeholder() on line 272 of handler_filter_string.inc.
Comment #3
attiks commentedComment #4
jelle_sThe fatal error should be solved,
and for the fulltext filtering: The solution you suggested (changing 'string' to 'text') works, but you have to clear the cache after that change ;-)
I changed
to
so it works for both now.
Comment #6
heorhi lazarevich commentedI tried 7.x-1.0 and 7.x-1.x-dev versions of the module. In both cases, for full text search filter only operators "contains" and "doesn't contain" are avaliable.
Comment #7
attiks commentedFor the moment this only works on the indexed field (like title, main body), it doesn't work on the special search field 'fulltext search'.
Changing this into a feature request, we'll see how we can solve this.
Comment #8
jelle_sBecause of the way the 'Fulltext search' is created, this can not be supported, it expects to only have 2 operators
=and<>(see search_api/contrib/search_api_views/includes/handler_filter_fulltext.inc lines 93 -> 101) and this behavior can not be changed, even if we overwrite the handler, servers will still expect this behavior and implement it in theircreateKeysQuerymethod (see search_api_db/service.inc line 805 and further).The only thing I can advise you is to create a filter for each seperate indexed field (see #7), put them all in an OR group and then use Views filters populate to populate them all with the same value.
Comment #9
jelle_s