Closed (duplicate)
Project:
Finder
Version:
6.x-1.8
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Jul 2010 at 12:44 UTC
Updated:
15 Dec 2010 at 05:16 UTC
Hi,
I use the Finder Views with an Autocomplete element to suggest matches in CCK fields. The Autocomplete element does not ignore the diacritics, but the search itself does. Say i type "li", there are no suggestions, but when I hit enter or the button, I get the results "líc, líce and lícnes".
If the Autocomplete element is in a Finder Node, it correctly ignores the diacritics, but it does not search CCK fields.
I am not sure if this is a Finder's bug, or if it has something to do with the Views module, but I'd love to be able to search both the CCK fields and ignore the diacritics.
Thanks!
Ondrej
Comments
Comment #1
danielb commentedMate, I've never even heard the word diacritics before, so I don't think I will be smart enough to fix this. AFAIK li and lí are different strings, so they should not match, ever, not even in the search results. I don't understand why they do.
If anyone can offer advice about why this is happening, or what is the best course of action to fix it, I will consider it. Is it possible there is another module doing this to the query, or your SQL database is smart enough to make this comparison in some cases, but not in others?
Out of curiosity what are your results matching settings in the element, and in the automcomplete field? (You know 'equals' and 'contains', etc...) There should be a seperate option for autocomplete. If you change them to be the same, do you see the same behaviour?
If you could post an export of your finder here, that would be helpful.
Comment #2
otichy commentedThanks for the answer!
Well, the diacritics are all those funny symbols above letters that modify their pronunciation. It's not a big deal for Modern English, as there are very few of those in use (naïve perhaps), but for many other languages or for older stages of English, these are rather important. My site is a dictionary of Old English, you can check the behaviour there: http://www.bosworthtoller.com
The usual approach of search engines is to simply ignore the diacritics, because it is difficult to type on English keyboard layouts, so many people just type without it, or in some languages the diacritics are only optional in writing, so it is difficult for the user to be sure what to search for. I agree that these are essentially different strings, but the standard and more convenient approach seems to be to ignore this. Drupal search does that also, because it seems MySQL indexer does that. Which is weird, because I though Finder uses the MySQL index as well...
Anyway, I added a CCK field to all my nodes, copied the title into it and stripped it of diacritics. Interestingly enough, the Finder now works fine - if you type "líc" it also autocompletes "lic". This however didn't seem to work the other way around while the search field had diacritics (typing "lic" didn't suggest "líc").
Both the Finder and the element search the start of the field. I guess this is not a terribly important issue, but it might be good to be aware of it :)
Here follows the Finder export:
array(
'finder_id' => '3',
'base' => 'views',
'title' => 'Search',
'description' => 'Uses view_finder to incorporate title_search values',
'path' => 'finder/3',
'block' => '1',
'settings' => array(
'form_on_page' => 0,
'form' => array(
'prefix' => '',
'prefix_format' => '4',
'suffix' => '',
'suffix_format' => '4',
'button_text' => 'Search',
'go_text' => 'Go',
),
'advanced' => array(
'no_results' => array(
'no_results' => 'There are no results to display',
),
'filter' => 0,
'submission' => 1,
'ahah' => 0,
'ahah_effect' => 'fade',
'element_combination' => '0',
'pager' => '25',
'match' => 'sw',
'goto' => 'best',
'hide_args' => 0,
'arg_sep' => ',',
'empty_symbol' => '',
'show_links' => 0,
'show_admin_links' => 0,
'cache_finder_find' => '60',
'search' => '1',
'search_tab' => 'node',
),
'views' => array(
'view' => 'view_finder',
'displays' => array(
'query' => 'default',
'output' => 'default',
),
'results' => '0',
'views_args' => array(
'args' => '',
'delimiter' => '/',
),
),
),
'elements' => array(
'0' => array(
'finder_element_id' => '3',
'finder_id' => '3',
'element' => 'autocomplete',
'title' => 'Search',
'weight' => '0',
'settings' => array(
'form' => array(
'description' => '',
'prefix' => '',
'prefix_format' => '4',
'suffix' => '',
'suffix_format' => '4',
'default_value' => '',
'required' => 0,
'field_prefix' => '',
'field_suffix' => '',
'maxlength' => '',
'size' => '28',
'max_suggestions' => '25',
'match' => 'sw',
'autosubmit' => 1,
),
'choices' => array(
'field' => array(
'node_data_field_title_search.field_title_search_value' => 'node_data_field_title_search.field_title_search_value',
),
'displays' => array(
'query' => 'default',
),
'views' => array(
'args' => '',
'delimiter' => '/',
),
),
'advanced' => array(
'delimit' => '',
'value_combination' => '0',
),
),
'element_handler' => array(
'#title' => 'Autocomplete textfield',
'#module' => 'finder_autocomplete',
),
'#_finder_object' => '1',
),
),
'elements_index' => array(
'3' => 0,
),
'base_handler' => array(
'#title' => 'Views finder',
'#module' => 'finder_views',
),
'admin_links' => array(
'finder/3' => 'View \"Path\"',
'admin/build/finder/3/edit' => 'Edit',
),
'links' => array(),
'#_finder_object' => '1',
)
Comment #3
danielb commentedI am closing this issue and creating a new one for advanced text matching
#998650: Advanced text comparison