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 translated a node to 3 different languages.
When I search with the core search module, I can only find this node, when I search for terms in the default language.
Comment | File | Size | Author |
---|---|---|---|
#18 | search-index.patch | 963 bytes | poiu |
#7 | language-search.patch | 4.46 KB | Jax |
|
Comments
Comment #1
plachYes, this is a missing feature ET should be addressing. Unfortunately we did not have time to work on it yet.
Comment #2
no2e CreditAttribution: no2e commentedI see; thanks for your answer, plach.
Can you estimate how long it might take?
Are there any workarounds, maybe?
I'm considering now, if I should switch to node-based translation (core) instead of field-based translation (with ET), because of this problem with the search function. Any thoughts?
Comment #3
plachThis is not going to be addressed soon unfortunately, at least from me.
Comment #4
no2e CreditAttribution: no2e commentedOkay, thanks for your answer.
For others, see also:
Language aware search for translated fields
Comment #5
plachBetter title.
Comment #6
Kristen PolThere is a module available to help with this until this issue is sorted out:
http://drupal.org/project/search_api_et
Comment #7
Jax CreditAttribution: Jax commentedAttached a solution that worked for us. We also use the title_module on most of our content types.
Comment #8
Gábor HojtsyDrupal 8 core issue opened at #1669876: Add missing language functionality in search module, it would be great to take the code from you Jax and port it to Drupal 8. I ported the database changes already :)
Comment #9
Gábor HojtsyJax: want to/can help with making this happen for real in core? I started porting your patch to Drupal 8 at #1669876: Add missing language functionality in search module, its mostly ported in terms of data storage, but I believe the querying needs to be improved.
Comment #10
mkalkbrennerApache Solr Multilingual is close to completely support entity translation:
#1301252: Add support for Entity (field) Translation
Comment #11
candelas CreditAttribution: candelas commentedany news on this for Drupal7? thanks for your work :)
Comment #12
plachNo, sorry, no time for it yet
Comment #13
heretic381 CreditAttribution: heretic381 commentedTrying to use search_api_et and noticed that translated titles are not indexed for some reason. It will find the node if you search by some strings that exists in the body, but not by the title !!!
Comment #14
heretic381 CreditAttribution: heretic381 commentedWhat's the destination file for the patch provided in #7???
Comment #15
heretic381 CreditAttribution: heretic381 commentedThe patch doesn't work. Maybe an update should fix it.
Comment #16
mkalkbrennerApache Solr Multilingual supports entity translation and titles converted to fields and translated by the title module.
Comment #17
le72Any news here?
Comment #18
poiu CreditAttribution: poiu commentedI've had some luck with this smaller, simpler patch for entity_translation (#7 patches the node and search modules). It works by implementing hook_node_update_index() and indexing multiple rendered versions of each node (one per language).
If you're patching an existing site you'll want to go to admin/config/search/settings and hit the Re-index button.
Comment #19
sinasalek CreditAttribution: sinasalek as a volunteer and commentedHad similar issue, patch #18 fixed the problem. Patch applied cleanly as well.
Thanks @poiu
Comment #22
plachWell done, thanks! This was a way overdue issue :)
I just committed and pushed #18 with a minor adjustment.
Comment #24
samuelsov CreditAttribution: samuelsov commented@plach you said you committed the patch but i see no trace of it either in -beta5, either in -dev.
What am i doing wrong ?
Comment #25
samuelsov CreditAttribution: samuelsov commentedOh, i see my mistake, it's in the entity_translation.node.inc... sorry !