• Resolved jimbo777

    (@jimbo777)


    Hi,

    We are experimenting with Translatepress and trying to automatically translate our product catalog into multiple languages via Google Cloud API. So far it has been working except the search for translated products does not bring up any results whatsoever.

    I think I figured out what the problem could be. I think that there is a conflict with the Relevanssi plugin which we use. By default it does not seem to be indexing the products within the translated languages when I rebuild the index. It only seems to be indexing the products with the default language. I think this maybe the main reason why the translated products are not showing up within the search results.

    On the other hand, I went ahead and disabled the Relevanssi plugin, then cleared cache, then tested the search again. However I am still not able to search for products in a different language other than the default language. So now I am thinking that there maybe more than one issue that I am facing.

    Could you please confirm if your plugin is compatible with Relevanssi and if there is maybe a tweak that can be used to build an index of products in different languages?

    Thx!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Relevanssi author here. Looks like TranslatePress stores the translations in a custom database table, where Relevanssi can’t see them. Relevanssi only looks at the post content, which has the default language text.

    The approach used by WPML and Polylang where the translations are separate posts is easier for search: it’s easy for Relevanssi to return all the posts that match the search terms.

    I don’t know how exactly TranslatePress works, so I can’t give any details on how to fix this, but Relevanssi does have a filter hook relevanssi_content_to_index which can be used to add custom content to posts when they are indexed. Being able to search translated content would require you write a function that adds the translated content to the post when it’s indexed using this filter hook.

    Thread Starter jimbo777

    (@jimbo777)

    Hi Mikko,

    Thank you for contributing to this discussion and your suggestions. I thought about your suggestion but I don’t think that the relevanssi_content_to_index solution is going to work for us since it would add all the additional content to the main relevanssi index.

    Problems that I see with this approach are as follows:

    – In our case it would blow up the main index since we are trying to offer 10k+ products in 10 different languages. This would generate a main index of 100K+ records and significantly slow down if not cripple the search.

    – It would allow users to search products in 10 different languages at any given time rather than limiting users searching within their language only. Further it would produce too many irrelevant search results particularily when only a few characters are used for searching and end up confusing the user.

    Thank you very much though for jumping right in and trying to help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Possible issues with Relevanssi Plugin’ is closed to new replies.