Tabnine Logo
IndexOptions.languageOverride
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: MorphiaOrg/morphia

@SuppressWarnings("deprecation")
com.mongodb.client.model.IndexOptions convert(final IndexOptions options, final boolean background) {
  if (options.dropDups()) {
    LOG.warn("Support for dropDups has been removed from the server.  Please remove this setting.");
  }
  com.mongodb.client.model.IndexOptions indexOptions = new com.mongodb.client.model.IndexOptions()
    .background(options.background() || background)
    .sparse(options.sparse())
    .unique(options.unique());
  if (!options.language().equals("")) {
    indexOptions.defaultLanguage(options.language());
  }
  if (!options.languageOverride().equals("")) {
    indexOptions.languageOverride(options.languageOverride());
  }
  if (!options.name().equals("")) {
    indexOptions.name(options.name());
  }
  if (options.expireAfterSeconds() != -1) {
    indexOptions.expireAfter((long) options.expireAfterSeconds(), TimeUnit.SECONDS);
  }
  if (!options.partialFilter().equals("")) {
    indexOptions.partialFilterExpression(Document.parse(options.partialFilter()));
  }
  if (!options.collation().locale().equals("")) {
    indexOptions.collation(convert(options.collation()));
  }
  return indexOptions;
}
origin: spring-projects/spring-data-mongodb

ops = ops.languageOverride(indexOptions.get("language_override").toString());
origin: jphp-group/jphp

@Override
public IndexOptions convert(Environment env, TraceInfo trace, Memory arg) throws Throwable {
  if (arg.isNull()) return null;
  ArrayMemory arr = arg.toValue(ArrayMemory.class);
  IndexOptions options = new IndexOptions();
  if (arr.containsKey("background")) { options.background(arg.valueOfIndex("background").toBoolean()); }
  if (arr.containsKey("defaultLanguage")) { options.defaultLanguage(arg.valueOfIndex("defaultLanguage").toString()); }
  if (arr.containsKey("bits")) { options.bits(arg.valueOfIndex("bits").toInteger()); }
  if (arr.containsKey("name")) { options.name(arg.valueOfIndex("name").toString()); }
  if (arr.containsKey("max")) { options.max(arg.valueOfIndex("max").toDouble()); }
  if (arr.containsKey("min")) { options.min(arg.valueOfIndex("min").toDouble()); }
  if (arr.containsKey("languageOverride")) { options.languageOverride(arg.valueOfIndex("languageOverride").toString()); }
  if (arr.containsKey("sparse")) { options.sparse(arg.valueOfIndex("sparse").toBoolean()); }
  if (arr.containsKey("unique")) { options.unique(arg.valueOfIndex("unique").toBoolean()); }
  if (arr.containsKey("version")) { options.version(arg.valueOfIndex("version").toInteger()); }
  if (arr.containsKey("textVersion")) { options.textVersion(arg.valueOfIndex("textVersion").toInteger()); }
  if (arr.containsKey("sphereVersion")) { options.sphereVersion(arg.valueOfIndex("sphereVersion").toInteger()); }
  return options;
}
origin: org.springframework.data/spring-data-mongodb

ops = ops.languageOverride(indexOptions.get("language_override").toString());
origin: org.wso2.extension.siddhi.store.mongodb/siddhi-store-mongodb

  break;
case "languageOverride":
  indexOptions.languageOverride(value.toString());
  break;
case "defaultLanguage":
origin: org.mongodb.morphia/morphia

@SuppressWarnings("deprecation")
com.mongodb.client.model.IndexOptions convert(final IndexOptions options, final boolean background) {
  if (options.dropDups()) {
    LOG.warning("Support for dropDups has been removed from the server.  Please remove this setting.");
  }
  com.mongodb.client.model.IndexOptions indexOptions = new com.mongodb.client.model.IndexOptions()
    .background(options.background() || background)
    .sparse(options.sparse())
    .unique(options.unique());
  if (!options.language().equals("")) {
    indexOptions.defaultLanguage(options.language());
  }
  if (!options.languageOverride().equals("")) {
    indexOptions.languageOverride(options.languageOverride());
  }
  if (!options.name().equals("")) {
    indexOptions.name(options.name());
  }
  if (options.expireAfterSeconds() != -1) {
    indexOptions.expireAfter((long) options.expireAfterSeconds(), TimeUnit.SECONDS);
  }
  if (!options.partialFilter().equals("")) {
    indexOptions.partialFilterExpression(Document.parse(options.partialFilter()));
  }
  if (!options.collation().locale().equals("")) {
    indexOptions.collation(convert(options.collation()));
  }
  return indexOptions;
}
origin: org.nuxeo.ecm.core/nuxeo-core-storage-mongodb

IndexOptions indexOptions = new IndexOptions().name(FULLTEXT_INDEX_NAME).languageOverride(LANGUAGE_FIELD);
coll.createIndex(indexKeys, indexOptions);
origin: lordofthejars/nosql-unit

mongoDbIndexOptions.languageOverride(indexOptions.getString("languageOverride"));
origin: com.github.dadrus.jpa-unit/jpa-unit-mongodb

applyIfTrue(options.containsKey("expireAfterSeconds"),
    () -> indexOptions.expireAfter(options.getLong("expireAfterSeconds"), TimeUnit.SECONDS));
applyIfTrue(options.containsKey("language_override"), () -> indexOptions.languageOverride(options.getString("language_override")));
applyIfTrue(options.containsKey("max"), () -> indexOptions.max(options.getDouble("max")));
applyIfTrue(options.containsKey("min"), () -> indexOptions.min(options.getDouble("min")));
origin: SoftInstigate/restheart

ret.languageOverride(options.get("language_override")
    .asString().getValue());
com.mongodb.client.modelIndexOptionslanguageOverride

Javadoc

Sets 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
  • 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.
  • isUnique
    Gets if the index should be unique.
  • getName,
  • isUnique,
  • max,
  • min,
  • sphereVersion,
  • bucketSize,
  • collation,
  • getDefaultLanguage,
  • getLanguageOverride

Popular in Java

  • Making http requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • requestLocationUpdates (LocationManager)
  • setContentView (Activity)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Collectors (java.util.stream)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now