You can to disable spelling correction and DYM suggestions on individual queries. This reduces the cost of running some queries in performance-sensitive applications.

In the presentation API, use the spell+nospell option with Ntx and Dx parameters. For example:

D=blue+suede+shoes&Dx=mode+matchallpartial+spell+nospell

In the Dgraph URL, specify the spell+nospell value to the opts parameter. For example, change this type of query from this syntax:

/search?terms=blue+suede+shoes&opts=mode+matchallpartial

To the following syntax:

/search?terms=blue+suede+shoes&opts=mode+matchallpartial+spell+nospell

In the Java Presentation API, you can disable spelling for a specific query as shown in this example:

ENEQuery nequery = new ENEQuery();
nequery.setDimSearchTerms("blue suede shoes");
nequery.setDimSearchOpts("spell nospell");

In the .NET API, you can disable spelling for a specific query as shown in this example:

ENEQuery nequery = new ENEQuery();
nequery.DimSearchTerms = "blue suede shoes";
nequery.DimSearchOpts = "spell nospell";

For more information on this option, see the chapter on spelling correction in the MDEX Engine Developer's Guide.


Copyright © Legal Notices