@Override protected ScoreFunction doToFunction(QueryShardContext context) { final int salt = (context.index().getName().hashCode() << 10) | context.getShardId(); if (seed == null) {
@Override protected ScoreFunction doToFunction(QueryShardContext context) { final MappedFieldType fieldType; if (context.getIndexSettings().isSingleType()) { fieldType = context.getMapperService().fullName(IdFieldMapper.NAME); } else { fieldType = context.getMapperService().fullName(UidFieldMapper.NAME); } if (fieldType == null) { // mapper could be null if we are on a shard with no docs yet, so this won't actually be used return new RandomScoreFunction(); } final int salt = (context.index().getName().hashCode() << 10) | context.getShardId(); final IndexFieldData<?> uidFieldData = context.getForField(fieldType); return new RandomScoreFunction(this.seed == null ? hash(context.nowInMillis()) : seed, salt, uidFieldData); }
@Override protected ScoreFunction doToFunction(QueryShardContext context) { final int salt = (context.index().getName().hashCode() << 10) | context.getShardId(); if (seed == null) {
@Override protected ScoreFunction doToFunction(QueryShardContext context) { final int salt = (context.index().getName().hashCode() << 10) | context.getShardId(); if (seed == null) {