Record search and value search queries can specify the language used for those queries.
The SearchFilter type has a Language attribute that you use to tell the Dgraph what language record (full-text) queries are in. Likewise, the ValueSearchConfig type has a similar Language attribute for value search queries. This per-query language code enables the Dgraph to select the appropriate dictionary for a given query.
If no per-query language ID is specified, the Dgraph uses the unknown language identifier.
The following code snippets show how to set English (using its language code of "en") as the language of any text portion of the query (such as search terms).
<Request xmlns="http://www.endeca.com/MDEX/conversation/2/0"> <State /> <Operator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SearchOperator" Within="false"> <SearchFilter Mode="AllPartial" RelevanceRankingStrategy="numfields" Key="Description" EnableSnippeting="false" Language="en"> crank </SearchFilter> </Operator> <ContentElementConfig xsi:type="RecordListConfig" HandlerFunction="RecordListHandler" HandlerNamespace="http://www.endeca.com/MDEX/conversation/2/0" Id="RecordList" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Column>Description</Column> <RecordsPerPage>5</RecordsPerPage> </ContentElementConfig> </Request>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <Request xmlns="http://www.endeca.com/MDEX/conversation/2/0"> <State /> <Operator xsi:type="RecordKindOperator" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <RecordKind>data</RecordKind> </Operator> <ContentElementConfig xsi:type="ValueSearchConfig" Id="ValueSearch" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" HandlerNamespace="http://www.endeca.com/MDEX/conversation/2/0" HandlerFunction="ValueSearchHandler" MaxPerProperty="5" RelevanceRankingStrategy="static (nbins,descending)" Mode="Any" Language="en"> <SearchTerm>envoy</SearchTerm> <RestrictToProperties> <Property>PROD_NAME</Property> </RestrictToProperties> </ContentElementConfig> </Request> </soap:Body> </soap:Envelope>