core/src/main/java/com/orientechnologies/orient/core/index/OIndexFullText.java
@Override
  public OIndexFullText put(Object key, final OIdentifiable singleValue) {
    if (key == null) {
      return this;
    }

    key = getCollatingValue(key);

    final Set<String> words = splitIntoWords(key.toString());

    // FOREACH WORD CREATE THE LINK TO THE CURRENT DOCUMENT
    for (final String word : words) {
      acquireSharedLock();
      try {
        if (apiVersion == 0) {
          doPutV0(singleValue, word);
        } else if (apiVersion == 1) {
          doPutV1(singleValue, word);
        } else {
          throw new IllegalStateException("Invalid API version, " + apiVersion);
        }

      } finally {
        releaseSharedLock();
      }
    }

    return this;
  }
@Override
  public OIndexFullText put(Object key, final OIdentifiable singleValue) {
    if (key == null) {
      return this;
    }

    key = getCollatingValue(key);

    final Set<String> words = splitIntoWords(key.toString());

    // FOREACH WORD CREATE THE LINK TO THE CURRENT DOCUMENT
    for (final String word : words) {
      acquireSharedLock();
      try {
        if (apiVersion == 0) {
          doPutV0(singleValue, word);
        } else if (apiVersion == 1) {
          doPutV1(singleValue, word);
        } else {
          throw new IllegalStateException("Invalid API version, " + apiVersion);
        }

      } finally {
        releaseSharedLock();
      }
    }

    return this;
  }
@ Override public OIndexFullText put ( Object key , final OIdentifiable singleValue ) { if ( key == null ) { return this ; } key = getCollatingValue ( key ) ; final Set < String > words = splitIntoWords ( key . toString ( ) ) ; // FOREACH WORD CREATE THE LINK TO THE CURRENT DOCUMENT for ( final String word : words ) { acquireSharedLock ( ) ; try { if ( apiVersion == 0 ) { doPutV0 ( singleValue , word ) ; } else if ( apiVersion == 1 ) { doPutV1 ( singleValue , word ) ; } else { throw new IllegalStateException ( "Invalid API version, " + apiVersion ) ; } } finally { releaseSharedLock ( ) ; } } return this ; }
Indexes a value and save the index. Splits the value in single words and index each one. Save of the index is responsibility of
the caller.
Indexes a value and save the index . Splits the value in single words and index each one . Save of the index is responsibility of the caller .