« Return to Thread: Filtering search results based on content-i18n

Re: Filtering search results based on content-i18n

by Markus Schwarz-2 :: Rate this Message:

Reply to Author | View in Thread


Hi, Grégory and Philipp,
thanks a lot for your fast response, I thought about Grégorys  
solution, but didn't grok it.

Now I'll try to manage the query.

I already use a language-switch, which sets some strings, based on  
selected language:

<c:set var="currlang" value="${pageContext.request.contextPath}$
{requestScope['javax.servlet.forward.servlet_path']}"/>
        <c:set var="englisch" value="${fn:replace(currlang, '/de/', '/en/')}"/>
        <c:set var="deutsch" value="${fn:replace(currlang, '/en/', '/de/')}"/>

        <c:set var="suche" value="Search"/>

        <c:if test="${fn:contains(currlang, '/en/')}">
                <c:set var="suche" value="Search"/>
                <c:set var="ihreSuche" value="Your query: "/>
                <c:set var="sorry" value="Your search for - "/>
                <c:set var="sorryEnd"  value=" - did not match any documents."/>
        </c:if>
       
        <c:if test="${fn:contains(currlang, '/de/')}">
                <c:set var="suche" value="Suche"/>
                <c:set var="ihreSuche" value="Ihre Suchergebnisse: "/>
                <c:set var="sorry" value="Es wurden keine mit Ihrer Suchanfrage - "/>
                <c:set var="sorryEnd"  value=" - übereinstimmenden Dokumente  
gefunden."/>
        </c:if>

I will use the same logic to modifiy the query.




Mit freundlichen Grüßen

i.A.  Markus Schwarz

---------------------------------------------------------------------
Dipl. Des. Markus Schwarz, Systemdesign

Micromata GmbH
Marie-Calm-Str. 1-5
D-34131 Kassel

Tel:  +49 561 / 31 67 93 - 0
Fax: +49 561 / 31 67 93 - 11

m.schwarz@...
http://www.micromata.com

AG Kassel HRB 7370

Geschäftsführung:
Dipl.-Ing. Thomas Landgraf
Dipl.-Phys. Kai Reinhard



Am 30.06.2009 um 14:36 schrieb Philipp Bärfuss:

>
>>> There are two simple solutions:
>>> - maintain each language tree separately (in that case you can  
>>> restrict the search to a certain hierarchy)
>>> - index the content externally. We have successfully used google  
>>> site search for that:
>>> -- http://www.google.com/enterprise/search/index.html
>> 3:
>> - if you're using a single tree, customize the search query and add  
>> something along the lines of "and language='de'" to it, where  
>> 'language' is the node property defining which language the page is  
>> in.
>
> This won't work because the same node contains all language data:
>
> - node
>  - text_en
>  - text_de
>
> the only solution would be to consequently name the properties you  
> search for: select * from nt:base where contains(text_de, expression).
>
> @Markus: do I understand your problem correctly?
>
> Philipp
>
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/home/community/mailing-lists.html
> To unsubscribe, E-mail to: <user-list-unsubscribe@...>
> ----------------------------------------------------------------
>


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <user-list-unsubscribe@...>
----------------------------------------------------------------

 « Return to Thread: Filtering search results based on content-i18n