As of now, there is no possiblity to cleanly implement a language-aware search for content with translated fields. Hm.
Integrating entity translation with e.g. search_api would make great sense - given the usfulness of entity translations and the statements hinting that translation in D8 could be based on translated fields instead of multiple nodes in translations sets (am i right on this?).

Therefore, an issue has been created in the search_api queue, see http://drupal.org/node/1335386

Let's work together there (or here) to find a solution for language aware search on translated fields!

Comments

plach’s picture

Integrating entity translation with e.g. search_api would make great sense - given the usfulness of entity translations and the statements hinting that translation in D8 could be based on translated fields instead of multiple nodes in translations sets (am i right on this?).

I think this plan makes total sense, if Search API will become the D7 standard for searching, but since the D8 content translation system will be probably based on ET, we need to ensure that the integration does not imply some kind of dependency that might interfere with porting ET in core.

Related issue (duplicate?): #1291388: Add support for multilingual core search.

Gábor Hojtsy’s picture

@danielnolde: do you have plans to move search API in core with Drupal 8 so that it would get ET support with that? It would be great to figure out who is going to work on that :)

danielnolde’s picture

Gábor, since drunken monkey http://drupal.org/user/205582 is the maintainer of search_api, we should ask him this questions.

From a developer point of view, search api is quite an abstraction layer, having it in Drupal core seems a bit ... phatcoreish (if that was the question). It would definitely make sense though to think about giving the core search a bit more of a framework character, to have better bare bone support for approaches like search api.

What's needed to make translatable fields work in search api, anyway, is rather a rewiring that has to be done internally in search api (foremost extending search item identifiers to contain more than the entity id, e.g. the language of the item 'view'/translation), or to support language dependent search indexes.

Gábor Hojtsy’s picture

Issue tags: +D8MI

Ok, well, IMHO extending the identifier for search to contain the entity id and language would be ideal here at least to update it cover the existing D7 field translation model in D8 :) Do you know of any work on that or its a green field so to speak?

Gábor Hojtsy’s picture

Issue tags: -D8MI

Uhm, did not intend to take over a contrib issue :) De-tagging.

danielnolde’s picture

As i understood Thomas/drunken monkey, this search-id-rewiring would be indeed a green field and quite a work to do.

That would be indeed the cleanest way to do it, and it would only involve working on search_api (as i understand).

fyi: At http://drupal.org/node/1323168#comment-5340212 we're discussing several other possible solutions within search_api.

plach’s picture

Title: Language aware search for translated fields » Search API integration

I'd dedicate this issue to the Search API integration, since depending on what decision comes out of #1323168: Add support for translated fields we might need some work on the ET side.

Surely we need to support also core search natively, which is going to be addressed in #1291388: Add support for multilingual core search.

danielnolde’s picture

Hey guys!

Finally we have a dedicated place to get support for entity translations into Search API:

The "Search API Entity Translation" module already offers very basic support to search through all entity translations of an entity via Search API:

http://drupal.org/project/search_api_et

This is a really handy quick win for all those in desperate need of somehow searching though multilingual content managed via Entity Translation.
More important: There is an issue to discuss and decide on how to support a more delicate and truely language-aware searchability for Entity Translation in Search API:

http://drupal.org/node/1393058

You're all invited to participate in this discussion!

maciej.zgadzaj’s picture

Component: Code » Base system

To follow up on this, as the issue is still active - drunken monkey has recently made a big first step towards refactoring that very-basicness of mentioned Search API Entity Translation and created Search API Entity Translation v2, which - although not really working properly yet - was a great starting point for me to come up with something already working, available in my sandbox Search API Entity Translation v2b.

maciej.zgadzaj’s picture

Status: Active » Closed (duplicate)

Also, I guess this issue could be closed, as there are several others dealing with (more or less) the same subject:

with #1393058: Decide on strategy for language aware search being the one where the most active discussion is happening.

plach’s picture

Thanks for the summary, I agree on closing this.