In the current release (3.1.x) of MarkLogic Server,
the only supported locale is U.S and the only supported
language is English.

   HOWEVER, you can store documents containing characters
in any language.  Mark Logic stores Unicode characters.
You can insert a document containing Russian text with
the locale set to U.S.

   The locale setting does not apply to document content.
It affects things like the format and text of error
messages, number and date formats, etc.  Currently, the
locale must always be Locale.US.  Other locales may be
supported in the future.  If your XCC client is running
on a system with a non-US locale, it may be necessary to
explicitly set Locale.US (because the client's current
locale setting is sent by default).

   The language setting controls how documents are
tokenized (word breaks) when inserted.  This affects
how indexes are built, and how text searches are performed.
In the current release, only english language tokenization
(space delimited) is supported.    Additional language
tokenizers will be supported in upcoming releases.

On Oct 31, 2006, at 7:13 AM, [EMAIL PROTECTED] wrote:


Hi all,

I have tried to insert new content into MarkLogic.
This code should work:

                session = getMlSession();
ContentCreateOptions opts = new ContentCreateOptions ();
                opts.setLocale(Locale.US);
                opts.setLanguage("en");
Content content = ContentFactory.newContent(uri, out.toByteArray(), opts);
                session.insertContent(content);

But it generates the following error:

com.marklogic.xcc.exceptions.XQueryException: XDMP-LANG: Unsupported language ru in /insert at com.marklogic.xcc.impl.handlers.ServerExceptionHandler.handleResponse( ServerExceptionHandler.java:31) at com.marklogic.xcc.impl.handlers.ContentInsertController.serverDialog (ContentInsertController.java:118) at com.marklogic.xcc.impl.handlers.AbstractRequestController.runRequest (AbstractRequestController.java:72) at com.marklogic.xcc.impl.SessionImpl.insertContent (SessionImpl.java:189) at com.marklogic.xcc.impl.SessionImpl.insertContent (SessionImpl.java:209)

When I change the client locale settings to United States, everything works fine. What is wrong in the code and how to change the default language for content?

Regards,
Andrey
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

---
Ron Hitchens [EMAIL PROTECTED]  650-655-2351




_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to