@Override
  public void execute(FunctionContext<LuceneFunctionContext> context) {
    if (context.getResultSender() instanceof PartitionedRegionFunctionResultSender) {
      PartitionedRegionFunctionResultSender resultSender =
          (PartitionedRegionFunctionResultSender) context.getResultSender();
      KnownVersion clientVersion = resultSender.getClientVersion();
      if (LuceneServiceImpl.LUCENE_REINDEX == false
          || (clientVersion != null && clientVersion
              .ordinal() < LuceneServiceImpl.LUCENE_REINDEX_ENABLED_VERSION_ORDINAL)) {
        // is a client server connection (or reindex disabled)
        execute(context, true);
        return;
      }
    }
    execute(context, false);
  }
{@link LuceneQueryFunction} coordinates text search on a member. It receives text search query
from the coordinator and arguments like region and buckets. It invokes search on the local index
and provides a result collector. The locally collected results are sent to the search
coordinator.
geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/distributed/LuceneQueryFunction.java