I need to restrict the search in TREX depending on the Language. Also I need to provide the search to the 3rd Party legacy system. Is that possible? If Yes then How? Can you please help me in this.
10x in Advance
> I need to restrict the search in TREX depending on the
AFAIK, it's not possible such a restriction.
What is certainly possible is restricting <b>indexing</b> to a subset of languages. So if you need to index documents e.g. in english and spanish, you can instruct the TREX preprocessor with such information so that it will only create two indexes, one for the docs in english, the other for the docs in spanish. In this way indexing is faster, as well as language recognition is more accurate.
You can configure these settings editing the section <u><encodings-languages-covered></u> in the <u><TREX_Installation_Directory>lexiconstd.langid-config</u> file.
However, once the english and the spanish indexes are created, you can only search on both. Infact the existence of separate indexes for different languanges is transparent for Knowledge Management, which sees a unique index. It's TREX that preprocesses the query and executes the query on the correct index, based on the language of the query.
> Also I need to provide the search to the 3rd Party
> legacy system
If you mean that you have a running 3rd party search engine and you need to integrate it with Knowledge Management, then this doc and its sample code could be very useful:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/kmc/integrating 3rd party search engines into km index management.article
Please have a look and let us know if it's helpful.