[opencms-dev] Multilanguage Workplace Offline Search

Dennis Dittmer dennis.dittmer at prioeins.de
Wed Apr 28 17:00:20 CEST 2010


Hi @all again,

much thanks for your fast responses. 

Yes, we're using different locale based folders in the OpenCms project,
to explain our project structure a little bit closer:

/opencms-project-1:

           /de [locales.available=de] ->/category-1 ->/'rubric 1'  ->
/'xmlcontent 1.html'
 
-> /'xmlcontent 2.html'
 
-> /'xmlcontent n.html'
 
-> /'rubric 2' -> /'xmlcontent 1.html'
 
-> /'xmlcontent n.html' 
 
-> /'rubric n' -> /'xmlcontent 1.html'
 
-> /'xmlcontent n.html'  
                                                      ->/category-2
->/'rubric 1' -> /'xmlcontent 1.html'
 
-> /'xmlcontent 2.html'
 
-> /'xmlcontent n.html'
 
-> /'rubric 2' -> /'xmlcontent 1.html'
 
-> /'xmlcontent n.html'

 
-> /'rubric n' -> /'xmlcontent 1.html'
 
-> /'xmlcontent n.html'  
                                                      ->/category-n
[...]

           /en [locales.available=en] ->/category-1 ->/'rubric 1'  ->
/'xmlcontent 1.html'
 
-> /'xmlcontent 2.html'
 
-> /'xmlcontent n.html'
 
-> /'rubric 2' -> /'xmlcontent 1.html'
 
-> /'xmlcontent n.html'

 
-> /'rubric n' -> /'xmlcontent 1.html'
 
-> /'xmlcontent n.html'  

                                                     ->/category-2
->/'rubric 1'  -> /'xmlcontent 1.html'
 
-> /'xmlcontent 2.html'
 
-> /'xmlcontent n.html'
 
-> /'rubric 2' -> /'xmlcontent 1.html'
 
-> /'xmlcontent n.html'       
 
-> /'rubric n' -> /'xmlcontent 1.html'
 
-> /'xmlcontent n.html'
                                                     ->/category-n [...]


           /fr [locales.available=fr]   ->/category-1 ->/'rubric 1' ->
/'xmlcontent 1.html'
 
-> /'xmlcontent 2.html'
 
-> /'xmlcontent n.html'
 
-> /'rubric 2' -> /'xmlcontent 1.html'
 
-> /'xmlcontent n.html'

 
-> /'rubric n' -> /'xmlcontent 1.html'
 
-> /'xmlcontent n.html'  
                                                     ->/category-2
->/'rubric 1' -> /'xmlcontent 1.html'
 
-> /'xmlcontent 2.html'
 
-> /'xmlcontent n.html'
 
-> /'rubric 2' -> /'xmlcontent 1.html'
 
-> /'xmlcontent n.html'  
 
-> /'rubric n' -> /'xmlcontent 1.html'
 
-> /'xmlcontent 2.html'
 
-> /'xmlcontent n.html'  
                                                     ->/category-n [...]

           /it [locales.available=it] ->/category-1 ->/'rubric 1' ->
/'xmlcontent 1.html'    
                                                      [...]
[...]                 [...]


So the Online Search for the 'Non Opencms User' in the fronted (the
website, not the OpenCms Workplace application itself!!!) works well by
an own written template, which displays a dynamic search form, where all
category- and rubric-folders are selectable through checkboxes, posting
the language specific name of the Online-Search-Indexes as hidden
parameters, configured in 'OpenCms Search Administration' with it's
index-source pointing to the corresponding virtual file system path, to
a result page template.

We've got round about 12.000 articles in that four languages imported
from an old commercial Content Management System, and the online search
in the template based web fronted works suitable fast and well. That was
the largest hurdle. ;-) 

So it's not the Online Search for the webuser in the web frontend, which
makes us headache, because he gets all seachable categories and rubrics
offered though that search form based webrowser-language-specific or
he's got chosen the language manually on the website, and so he gets the
article search results in that wished language.

Now if the editorial journalist logs in the OpenCms Workplace
Application with it's OpenCms User, he's got the possibility to search
in the OpenCms Workplace via the menu point 'Search' from his Workplace
View for the xml content, in our case the articles. 

But if you're clicking on that 'Search' button, you get a view, where
you can edit and select the 'query', 'sort order', 'Restrict search' and
the 'Fields to search in', but there's only one hard configured "Offline
project EN (VFS)"-search-index to use, you don't have the possibility to
change that index. 

In OpenCms-Search-Administration, click on "View" -> "Administration" ->
"Search Management" you can configure further locale specific Offline
Indexes, if you want, with one or more 'index sources', pointing to the
vfs path(s) you want. But the only way we found out to use them in the
OpenCms-Workplace-Search, is to stop the server and change this section
in opencms-workplace.xml:

        <workplace-search>
            <searchindex-name>Offline project EN
(VFS)</searchindex-name>
            <searchview-style>explorer</searchview-style>
        </workplace-search>

and start the server again to use that index, you've edited there.

Now when your're using this default 'Offline project EN (VFS)' workplace
index, you'll find only results in folder path
"/opencms-project-1/en/...", because the textual content in the articles
('xmlcontent x.html') in paths '/opencms-project-1/de/...',
'/opencms-project-1/fr/...' and '/opencms-project-1/it/...' uses the
internal 'de'-, 'fr'-, 'it'-XML-path in the xmlcontent-Documents
(articles). 

So you can switch this Workplace Search Index by the above described
way, using another own configured Offline Search Index for the OpenCms
Workplace, fetching content for that locale, because one Search Index
has only one configurable locale, but the 'OpenCms user' you're using in
the Workplace has not the chance to get all article results in all
locales (folders) for the search term 'Airbus A380' at once in 1 search
run. 
You don't even have the chance to select/switch different
locale-specific Offline indexes, to get your search results executing
the search 4 times, but with different search indexes (locales), that's
a thing, where we can also live with.

So my question is: Is there the possibility, that an OpenCms Workplace
User has the possibility to change that 'Offline project EN (VFS)' index
for search runs during his OpenCms Workplace Session, if configured more
indexes, e.g. 'Offline project DE (VFS)', 'Offline project FR (VFS)',
'Offline project IT (VFS)'?

Best way would be, that one index has multiple locales configured, to
analyze the xmlcontent-Documents, but that's unfortunately not possible,
we know.

Maybe you know a way for our problem and thanks for your help in
advance.

with best Regards,


Dennis

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20100428/a77aa3f1/attachment.htm>


More information about the opencms-dev mailing list