code: public static CompareNameQuery createQueryForNodesWithNameLessThan( Name constraintValue,
                                                                          String localNameField,
                                                                          ValueFactories factories,
                                                                          Function<String, String> caseOperation ) {
          return new CompareNameQuery(localNameField, constraintValue, factories.getNameFactory(),
                                      (name1, name2) -> NAME_COMPARATOR.compare(name1, name2) < 0,
                                      caseOperation);
      }
docs: Construct a {@link Query} implementation that scores documents such that the node represented by the document has a name
  that is less than the supplied constraint name.
  
  @param constraintValue the constraint value; may not be null
  @param localNameField the name of the document field containing the local name value; may not be null
  @param factories the value factories that can be used during the scoring; may not be null
  @param caseOperation the operation that should be performed on the indexed values before the constraint value is being
  evaluated; may be null which indicates that no case conversion should be done
  @return the query; never null