Codota Logo
IndexOptions.getLanguageOverride
Code IndexAdd Codota to your IDE (free)

How to use
getLanguageOverride
method
in
com.mongodb.client.model.IndexOptions

Best Java code snippets using com.mongodb.client.model.IndexOptions.getLanguageOverride (Showing top 5 results out of 315)

  • Common ways to obtain IndexOptions
private void myMethod () {
IndexOptions i =
  • Codota Iconnew IndexOptions()
  • Codota Iconnew IndexOptions().unique(true)
  • Smart code suggestions by Codota
}
origin: jphp-group/jphp

@Override
public Memory unconvert(Environment env, TraceInfo trace, IndexOptions arg) throws Throwable {
  if (arg == null) return Memory.NULL;
  ArrayMemory options = ArrayMemory.createHashed(12);
  options.put("name", arg.getName());
  options.put("background", arg.isBackground());
  options.put("sparse", arg.isSparse());
  options.put("unique", arg.isUnique());
  if (arg.getDefaultLanguage() != null) options.put("defaultLanguage", arg.getDefaultLanguage());
  if (arg.getBits() != null) options.put("bits", arg.getBits());
  if (arg.getMax() != null) options.put("max", arg.getMax());
  if (arg.getMin() != null) options.put("min", arg.getMin());
  if (arg.getLanguageOverride() != null) options.put("languageOverride", arg.getLanguageOverride());
  if (arg.getVersion() != null) options.put("version", arg.getVersion());
  if (arg.getTextVersion() != null) options.put("textVersion", arg.getTextVersion());
  if (arg.getSphereVersion() != null) options.put("sphereVersion", arg.getSphereVersion());
  return options;
}
origin: org.mongodb/mongo-java-driver

.weights(toBsonDocument(model.getOptions().getWeights()))
.defaultLanguage(model.getOptions().getDefaultLanguage())
.languageOverride(model.getOptions().getLanguageOverride())
.textVersion(model.getOptions().getTextVersion())
.sphereVersion(model.getOptions().getSphereVersion())
origin: MorphiaOrg/morphia

@Test
public void indexOptionsConversion() {
  IndexOptionsBuilder indexOptions = indexOptions();
  com.mongodb.client.model.IndexOptions options = indexHelper.convert(indexOptions, false);
  assertEquals("index_name", options.getName());
  assertTrue(options.isBackground());
  assertTrue(options.isUnique());
  assertTrue(options.isSparse());
  assertEquals(Long.valueOf(42), options.getExpireAfter(TimeUnit.SECONDS));
  assertEquals("en", options.getDefaultLanguage());
  assertEquals("de", options.getLanguageOverride());
  assertEquals(indexHelper.convert(indexOptions.collation()), options.getCollation());
  assertTrue(indexHelper.convert(indexOptions, true).isBackground());
  assertTrue(indexHelper.convert(indexOptions.background(false), true).isBackground());
  assertTrue(indexHelper.convert(indexOptions.background(true), true).isBackground());
  assertTrue(indexHelper.convert(indexOptions.background(true), false).isBackground());
  assertFalse(indexHelper.convert(indexOptions.background(false), false).isBackground());
}
origin: org.wso2.extension.siddhi.store.mongodb/siddhi-store-mongodb

indexOptionsMap.put("expireAfterSeconds", expectedIndexOptions.getExpireAfter(TimeUnit.SECONDS));
indexOptionsMap.put("weights", expectedIndexOptions.getWeights());
indexOptionsMap.put("languageOverride", expectedIndexOptions.getLanguageOverride());
indexOptionsMap.put("defaultLanguage", expectedIndexOptions.getDefaultLanguage());
indexOptionsMap.put("textVersion", expectedIndexOptions.getTextVersion());
origin: org.mongodb/mongodb-driver-core

.weights(toBsonDocument(model.getOptions().getWeights()))
.defaultLanguage(model.getOptions().getDefaultLanguage())
.languageOverride(model.getOptions().getLanguageOverride())
.textVersion(model.getOptions().getTextVersion())
.sphereVersion(model.getOptions().getSphereVersion())
com.mongodb.client.modelIndexOptionsgetLanguageOverride

Javadoc

Gets the name of the field that contains the language string.

For text indexes, the name of the field, in the collection's documents, that contains the override language for the document.

Popular methods of IndexOptions

  • <init>
  • unique
    Should the index should be unique.
  • name
    Sets the name of the index.
  • background
    Should the index should be created in the background
  • expireAfter
    Sets the time to live for documents in the collection
  • sparse
    Should the index only references documents with the specified field
  • partialFilterExpression
    Sets the filter expression for the documents to be included in the index
  • defaultLanguage
    Sets the language for the text index.The language that determines the list of stop words and the rul
  • languageOverride
    Sets the name of the field that contains the language string.For text indexes, the name of the field
  • weights
    Sets the weighting object for use with a text index.An document that represents field and weight pai
  • bits
    Sets the number of precision of the stored geohash value of the location data in 2d indexes.
  • getName
    Gets the name of the index.
  • bits,
  • getName,
  • isUnique,
  • max,
  • min,
  • sphereVersion,
  • bucketSize,
  • collation,
  • getDefaultLanguage

Popular in Java

  • Reactive rest calls using spring rest template
  • getExternalFilesDir (Context)
  • orElseThrow (Optional)
  • getSystemService (Context)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now