/// <summary> /// Selects the specified fields directly from the index /// </summary> /// <typeparam name="TProjection">The type of the projection.</typeparam> public virtual IAsyncDocumentQuery <TProjection> SelectFields <TProjection>(string[] fields, string[] projections) { var asyncDocumentQuery = new AsyncDocumentQuery <TProjection>(theSession, #if !SILVERLIGHT theDatabaseCommands, #endif theAsyncDatabaseCommands, indexName, fields, projections, queryListeners, isMapReduce) { pageSize = pageSize, queryText = new StringBuilder(queryText.ToString()), start = start, timeout = timeout, cutoff = cutoff, theWaitForNonStaleResults = theWaitForNonStaleResults, sortByHints = sortByHints, orderByFields = orderByFields, groupByFields = groupByFields, aggregationOp = aggregationOp, transformResultsFunc = transformResultsFunc, includes = new HashSet <string>(includes), negate = negate, queryOperation = queryOperation, queryStats = queryStats, rootTypes = { typeof(T) }, highlightedFields = new List <HighlightedField>(highlightedFields), highlighterPreTags = highlighterPreTags, highlighterPostTags = highlighterPostTags }; asyncDocumentQuery.AfterQueryExecuted(afterQueryExecutedCallback); return(asyncDocumentQuery); }
/// <summary> /// Selects the specified fields directly from the index /// </summary> /// <typeparam name="TProjection">The type of the projection.</typeparam> /// <param name="fields">The fields.</param> public virtual IAsyncDocumentQuery <TProjection> SelectFields <TProjection>(params string[] fields) { var asyncDocumentQuery = new AsyncDocumentQuery <TProjection>(theSession, #if !SILVERLIGHT theDatabaseCommands, #endif #if !NET_3_5 theAsyncDatabaseCommands, #endif indexName, fields, queryListeners) { pageSize = pageSize, theQueryText = new StringBuilder(theQueryText.ToString()), start = start, timeout = timeout, cutoff = cutoff, theWaitForNonStaleResults = theWaitForNonStaleResults, sortByHints = sortByHints, orderByFields = orderByFields, groupByFields = groupByFields, aggregationOp = aggregationOp, transformResultsFunc = transformResultsFunc, includes = new HashSet <string>(includes), negate = negate, queryOperation = queryOperation, queryStats = queryStats }; asyncDocumentQuery.AfterQueryExecuted(afterQueryExecutedCallback); return(asyncDocumentQuery); }
/// <summary> /// Selects the specified fields directly from the index /// </summary> /// <typeparam name="TProjection">The type of the projection.</typeparam> public virtual IAsyncDocumentQuery <TProjection> SelectFields <TProjection>(string[] fields, string[] projections) { var asyncDocumentQuery = new AsyncDocumentQuery <TProjection>(theSession, theDatabaseCommands, theAsyncDatabaseCommands, indexName, fields, projections, queryListeners, isMapReduce) { pageSize = pageSize, queryText = new StringBuilder(queryText.ToString()), start = start, timeout = timeout, cutoff = cutoff, cutoffEtag = cutoffEtag, queryStats = queryStats, theWaitForNonStaleResults = theWaitForNonStaleResults, theWaitForNonStaleResultsAsOfNow = theWaitForNonStaleResultsAsOfNow, sortByHints = sortByHints, orderByFields = orderByFields, isDistinct = isDistinct, allowMultipleIndexEntriesForSameDocumentToResultTransformer = allowMultipleIndexEntriesForSameDocumentToResultTransformer, negate = negate, transformResultsFunc = transformResultsFunc, includes = new HashSet <string>(includes), isSpatialQuery = isSpatialQuery, spatialFieldName = spatialFieldName, queryShape = queryShape, spatialRelation = spatialRelation, spatialUnits = spatialUnits, distanceErrorPct = distanceErrorPct, rootTypes = { typeof(T) }, defaultField = defaultField, beforeQueryExecutionAction = beforeQueryExecutionAction, afterQueryExecutedCallback = afterQueryExecutedCallback, afterStreamExecutedCallback = afterStreamExecutedCallback, highlightedFields = new List <HighlightedField>(highlightedFields), highlighterPreTags = highlighterPreTags, highlighterPostTags = highlighterPostTags, resultsTransformer = resultsTransformer, transformerParameters = transformerParameters, disableEntitiesTracking = disableEntitiesTracking, disableCaching = disableCaching, showQueryTimings = showQueryTimings, lastEquality = lastEquality, shouldExplainScores = shouldExplainScores }; asyncDocumentQuery.AfterQueryExecuted(afterQueryExecutedCallback); return(asyncDocumentQuery); }
/// <summary> /// Selects the specified fields directly from the index /// </summary> /// <typeparam name="TProjection">The type of the projection.</typeparam> public virtual IAsyncDocumentQuery <TProjection> SelectFields <TProjection>(string[] fields, string[] projections) { var asyncDocumentQuery = new AsyncDocumentQuery <TProjection>(theSession, #if !SILVERLIGHT theDatabaseCommands, #endif theAsyncDatabaseCommands, indexName, fields, projections, queryListeners, isMapReduce) { pageSize = pageSize, queryText = new StringBuilder(queryText.ToString()), start = start, timeout = timeout, cutoff = cutoff, cutoffEtag = cutoffEtag, queryStats = queryStats, theWaitForNonStaleResults = theWaitForNonStaleResults, sortByHints = sortByHints, orderByFields = orderByFields, groupByFields = groupByFields, aggregationOp = aggregationOp, negate = negate, transformResultsFunc = transformResultsFunc, includes = new HashSet <string>(includes), isSpatialQuery = isSpatialQuery, spatialFieldName = spatialFieldName, queryShape = queryShape, spatialRelation = spatialRelation, spatialUnits = spatialUnits, distanceErrorPct = distanceErrorPct, rootTypes = { typeof(T) }, defaultField = defaultField, beforeQueryExecutionAction = beforeQueryExecutionAction, afterQueryExecutedCallback = afterQueryExecutedCallback, highlightedFields = new List <HighlightedField>(highlightedFields), highlighterPreTags = highlighterPreTags, highlighterPostTags = highlighterPostTags, resultsTransformer = resultsTransformer, queryInputs = queryInputs, disableEntitiesTracking = disableEntitiesTracking, disableCaching = disableCaching, lastEquality = lastEquality }; asyncDocumentQuery.AfterQueryExecuted(afterQueryExecutedCallback); return(asyncDocumentQuery); }