text: public static Query createJoinQuery(String fromField,boolean multipleValuesPerDocument,String toField,Query fromQuery,IndexSearcher fromSearcher,ScoreMode scoreMode) throws IOException {final GenericTermsCollector termsWithScoreCollector;if (multipleValuesPerDocument) {Function<SortedSetDocValues> mvFunction = DocValuesTermsCollector.sortedSetDocValues(fromField);termsWithScoreCollector = GenericTermsCollector.createCollectorMV(mvFunction, scoreMode);} else {Function<BinaryDocValues> svFunction = DocValuesTermsCollector.binaryDocValues(fromField);termsWithScoreCollector = GenericTermsCollector.createCollectorSV(svFunction, scoreMode);}return createJoinQuery(multipleValuesPerDocument, toField, fromQuery, fromField, fromSearcher, scoreMode, termsWithScoreCollector);}