Hi all,
I’m back again 
This time I’m looking into adding Full text searching to the site. A quick overview of the site. It’s multilingual using i18n, it has several pages/views with static content (pulled from resource bundles) and a news section which the client will be able to add articles to through a simple admin.
So indexing the news isn’t an issue as all the content is stored in the database. However indexing the rest of the pages seems to be a bit beyond me at the moment.
Does anyone know of a way?
One way I did think of doing it would be to duplicate the text from each page in the database with the associated handler.action then index that data. But that seems a bit prone to inconsistencies.
Any thought’s would be greatly appreciated.
Thanks
Richard
There are different strategies for i18N solutions.
- Mirroring site:
In this case every single page would have a copy of the current content in other languages.
– en
– de
— en
— de
– b product
— en
— de
etc.
- Different trees based on locale:
The content would be different in different locales/languages. You may want to put all sites in English but only some pages or contact information in any other language. For those kind of pages it would be good to create a tree based logic starting with a locale roots such as
etc.
For both approach indexing would not be any different then normal content indexing. Whatever content that you would search would only matches with its language and there is no worry on that since it would only refer those pages.
Some suggestions:
- The resource bundle should only be used for templates, not direct content.
- Templates should not contain and direct content which would be searchable.
- Any locale related content should be either in RB files or database. Not in the code as hardcoded.
- All content can be stored in database based on locale flags such as a field which contains locale as en_us and filter those content on queries based on the requested locale.
- RB files can also be stored in DB and can be loaded on the application start.
If you would provide more scenarios for the project I can suggest some more details.
/OD