Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have verified that this module is enabled and it is working when i create a test view with normal fields.
However when trying to enable auto complete on a view of indexed nodes (search api) the use autocomplete box is not available on the exposed filter (see attached screenshot)
Comment | File | Size | Author |
---|---|---|---|
Screen Shot 2013-08-05 at 11.19.16 PM.png | 100.41 KB | Colin @ PCMarket |
Comments
Comment #1
chrism2671 CreditAttribution: chrism2671 commented+1
Comment #2
chrism2671 CreditAttribution: chrism2671 commentedI'm trying to hunt down the cause of this- a quick scan of the code suggests it *should* work, just need to persuade it.
Comment #3
T.Mardi CreditAttribution: T.Mardi commentedSame issue here. I can't get the option to use autocomplete functionality on indexed fields using Search API.
Did you have any luck getting it to work?
Comment #4
chrism2671 CreditAttribution: chrism2671 commentedI did investigate but it requires a fair bit of fiddly rearranging to make it work; I haven't got time to look at it at the moment I'm afraid.
Comment #5
T.Mardi CreditAttribution: T.Mardi commentedNo problem. I've noticed a autocomplete filter in use here using Facet API.
Will look into this to and reply back if I find a solution.
Comment #6
vivdrupal CreditAttribution: vivdrupal commentedRequest to the maintainer - vasike
Could you please check if it is possible to use the module with indexed fields of Search Api?
Badly need this feature. Thanks.
Comment #7
vasikefor the Search API could you try use Search API autocomplete.
this waht is used in the example given at #5.
Comment #8
vivdrupal CreditAttribution: vivdrupal commented@vasike
Thanks for your response.
Ended up using the 'Chosen' module.
Comment #9
narkoff CreditAttribution: narkoff commentedI also am looking to get this working with indexed fields of Search API. I am currently using Search API Autocomplete, but it does not have some of the features of Views Autocomplete Filters and, more importantly, does not retrieve "complete" suggestions.
For example, if 'Los' is entered in exposed filter for Title field, Search API Autocomplete only returns matches for a word in the title field that starts with 'Los'. However, it does not return 'Los Angeles' as a suggestion. It appears that Views Autocomplete Filters will return suggestions that include the whole Title field, not just the single word that starts with the characters entered in the exposed filter.
Returning the complete field as the autocomplete suggestion, and not just the single word that contains the match, is the behavior I'm looking for.
Comment #10
dureaghin CreditAttribution: dureaghin commentedHi narkoff,
Did you figure out how to use "complete" suggestions?
Thanks.
Comment #11
narkoff CreditAttribution: narkoff commented@Hakintosh,
I could not get Views Autocomplete Filters to work with my Search API indexed fields correctly. I did work with Search API Autocomplete module a bit. It works on indexed fields, but I still could not get the returned suggestions to be how I wanted. There were either stemming issues or the complete field would not be returned. I did get close by trying different Solr filter classes in the schema_extra_fields.xml. This thread gives more detail.
However, I ended up using the Search Autocomplete module. It works with Search API fields and I am getting the complete field to be returned as a suggestion.
Comment #12
NWOM CreditAttribution: NWOM commentedThis seems to be a problem also in the newest dev (not sure if feature or bug). The potential workaround using the Search Autocomplete sadly only works with keywords currently, and isn't the best use case when wanting to only show Entity Titles as an example.
Comment #13
dsnopekThe reason this doesn't work, is that
views_autocomplete_filters_views_data_alter()
is swapping in the autocomplete handler for onlyviews_handler_filter_string
andviews_handler_filter_combine
:But the indexed fields use handlers that appear to come from the Entity API module, like
entity_views_handler_field_text
.Here's some of the views data I
print_r()
'ed for the node 'title' field, and a random long text field:In order to get views_autocomplete_filters working with these fields, we'd need to have a views handler that we could swap in for that, which would support the Entity API way of doing views handlers, while also adding the autocomplete functionality.
Comment #14
vasikeThis is not a bug, but a feature request
as it was not implemented yet - see previous comment.
@dsnopek : thank you.
Comment #15
mascot CreditAttribution: mascot commentedIs there a work around to handle this....any suggestions could be of great help
Comment #17
vasikethere is first implementation committed.
so anyone that could help testing the dev version of the module, please.
thanks
Comment #18
zied.ellouze CreditAttribution: zied.ellouze commented@vasike I have tested the dev version and it not works :(
Thank you
Comment #19
narkoff CreditAttribution: narkoff commented@vasike, regarding #16 commit - Testing an indexed view (Search API):
1. Editing the view's exposed filter now has an 'Use Autocomplete' checkbox which when enabled, several additional options flex in:
a. Maximum number of items in Autocomplete results.
b. Suggestions depend on other filter fields.
c. Field with Autocomplete results.
d. Unformatted dropdown and unformatted suggestion checkboxes.
2. The view's exposed filter now generates a throbber when entering a value in the filter. However, no suggestions are returned. No console errors are generated and the requested URL is:
<site.com>/autocomplete_filter/search_api_views_fulltext/<view name>/<display name>/0/<value entered in exposed filter>
I've tried different settings but can't get any suggestions to be returned.
UPDATE: The option 'Field with autocomplete results' is a dropdown, but only value I get is the default 'Add some fields to view'. I've tried adding some fields to view, but the dropdown still only has the default/empty value. Is a value required to be selected in this dropdown in order to get any suggestions returned in the autocomplete exposed filter?
UPDATE 2: The only type of field I can get to populate in the 'Field with autocomplete results' dropdown is a taxonomy term field that is indexed in Search API. When populated, the autocomplete functionality works in the exposed filter. However, I can not get it to work for any other type of fields.
Comment #20
jenlamptonSetting status back to Active since it sounds like we could still use some refinement for what's been committed to the latest -dev.