Loading...
 
Features / Usability

Features / Usability


Search in different languages

posts: 19

Does anyone have an idea why the search module displays the contents of all languages on the results page?

Under the Multilingual Settings I have set the following additional checkboxes:
- Synchronize page and site language
- Restrict search language by default
Search02

I created an English (TEST-EN) and a German (TEST-DE) page and put the search module and the language switch in the left menu area.
If I enter "TEST" in the search module, both pages will be found, both as suggestions and on the result page itself.
Search01
Search03
If I search directly from the results page, only the page of the current language will be found.

At the respective address in the browser you can see that the language filter is not taken into account in the search module.

Search module:
http://demo.tiki.org/21x/tiki-searchindex.php?filter%7Econtent=test&search=Search

Search page:
http://demo.tiki.org/21x/tiki-searchindex.php?filter%7Econtent=test&sort_mode=score_ndesc&filter%7Elanguage=en&filter%7Elanguage_unspecified=1

Do I overlook an additional option to be set in or for the search module?

posts: 8633 Israel
Christoph wrote:

- Restrict search language by default

I created an English (TEST-EN) and a German (TEST-DE) page and put the search module and the language switch in the left menu area.


Hello,

Naming EN and DE them is not enough.
Did you assign the corresponding language to the page ? (edit->properties)

More related possibilities may be around the lack of set of translation for those pages.
By default, if there is no set of translation (test-en in english and test-en in german) the available version is displayed and as "test" exist in both name it may induce such confusion. (the hyphen could be considered as space)

Hope to have more time to answer you next comment. ;-)

posts: 19
Bernard Sfez / Tiki Specialist wrote:

Hello,

Naming EN and DE them is not enough.
Did you assign the corresponding language to the page ? (edit-properties)


Thank you for your answer
The test pages had set the respective language and the title was chosen simply to show the problem.
In our wiki we have program functions whose page titles in different languages partly have the same content that you would search for.

Problem seems to be the missing language parameter when running the search via the search widget:
&filter~language=en&filter~language_unspecified=1

In the search module there is the field "Additional filters".
But even if I add the parameters there, it has no effect on the search result:
Search001
Search002
Search003

And even if it would work I would have to display different search widgets depending on the language.

search module (with additional filters):
http://demo.tiki.org/21x/tiki-searchindex.php?filter%7Econtent=tikiwiki&filter%7Etype%5B%5D=wiki+page&filter%7Efilter%7Elanguage=en&filter%7Efilter%7Elanguage_unspecified=1&search=Search

search page:
http://demo.tiki.org/21x/tiki-searchindex.php?filter%7Econtent=tikiwiki&sort_mode=score_ndesc&filter%7Etype%5B%5D=wiki+page&filter%7Elanguage=en&filter%7Elanguage_unspecified=1

Do I have to embed the filter differently?
Is it possible to add the parameter directly in the source code of the search module?


posts: 8633 Israel
Christoph wrote:

At the respective address in the browser you can see that the language filter is not taken into account in the search module.

Search module:
http://demo.tiki.org/21x/tiki-searchindex.php?filter%7Econtent=test&search=Search

Search page:
http://demo.tiki.org/21x/tiki-searchindex.php?filter%7Econtent=test&sort_mode=score_ndesc&filter%7Elanguage=en&filter%7Elanguage_unspecified=1

Do I overlook an additional option to be set in or for the search module?


Mmm...
1/ Post a bug report at dev.tiki.org and wait for someone to fix it.

2/ Again I didn’t test but I understand from your post that the "Search page" do the job while the "Search module" don’t.
If this is correct you should be able to create your own module (custom module) using the "Search page" template code.

3/ Or... you could hire a consultant at : https://tiki.org/consultants to have it fixed for you.

4/ Use a customSearch module ?

Good luck


posts: 19

Many thanks for the answers and suggestions.
I have now created separate search modules for both languages, this can be made visible in the options only for single languages.
There I also set the additional filters without prefix "filter~" for the respective language (then they work as hoped).

posts: 8633 Israel
Christoph wrote:

Many thanks for the answers and suggestions.
I have now created separate search modules for both languages, this can be made visible in the options only for single languages.
There I also set the additional filters without prefix "filter~" for the respective language (then they work as hoped).


Always happy to read my answers were useful. ?
While it could have been simpler without the issue you described, I found handy having duplicate "specialised" modules especially in multilingual for filtering and positioning. (I often need right to left)


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting