Language-aware search
meba - June 23, 2007 - 21:28
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | node.module |
| Category: | feature request |
| Priority: | normal |
| Assigned: | robertDouglass |
| Status: | closed |
Description
Now when D6 supports translations of nodes, search module should be updated to index words according to languages and let user limit searching to particular languages.

#1
Modified title.
#2
Bumping to 7.x
#3
Very straightforward. Note that this doesn't provide and method for setting search preferences, you have to set the language every search. This is consistent with the other advanced search features.
#4
It does not make much sense to use checkboxes for the language selection. I would rather see a select box here (a search term is rarely the same across different languages). Otherwise, the patch looks good.
#5
Oh, and as a next step, we will also need a language-specific steemer and user-language aware search (but that's for another feature request).
#6
select or radios? Which do people think are better?
#7
Checkboxes are respecting usability a little bit more because they present the choices directly to the user. But I am afraid we need to be consistent with the fact, that thay may be too many languages enabled so I vote for the select box too.
#8
Actually, I disagree. If Drupal.org were a mishmash of languages, I'd still search for Drupal in de and en.
#9
Would you really search the *same exact word* in both English and German? Even if it could, as a corner case, make sense (for instance for family names or names of organizations), I'm not sure it would be really useful.
#10
This one makes it a select. The side effect is that you can only search for one language, even if you use a syntax like language:en,ar,de, it won't work. The select now contains an option "All" which is the default.
#11
Well, especially with German, there are lots of words which that language share with English, at least in the tech world I know. I'd support selecting multiple languages. Why make it impossible?
#12
I should be able to work it out so that we have a select widget, but the extraction supports multiple values (so a url with language:en,de,ar would work). That way someone could come along and form_alter the widget if they need. Will do this tomorrow unless someone else takes a stab.
#13
This one leaves the select widget but allows for language:en,de,jp,ar syntax.
#14
I might want to search for the word 'Drupal' in English, Dutch and French, but not in Chinese or Japanese. A lot of words, and names in particular, are language independent. I think this is a nice little improvement. (Would even be better if it came with a simpletest.)
#15
I've tested this some more and committed it to CVS HEAD. Thanks.
#16
Automatically closed -- issue fixed for two weeks with no activity.