import { MutationState } from './mutationstate' ; import { SearchFacet } from './searchfacet' ; import { SearchSort } from './searchsort' ; import { RequestSpan } from './tracing' ; category export class SearchMetaData { } category export class SearchRow { } category export class SearchResult { /**
     * The rows which have been returned by the query.
     */ rows : any [ ] ; /**
     * The meta-data which has been returned by the query.
     */ meta : SearchMetaData ; internal constructor ( data ) { this . rows = data . rows ; this . meta = data . meta ; } } category export enum HighlightStyle { /**
     * Indicates that matches should be highlighted using HTML tags in the result text.
     */ HTML = 'html' , /**
     * Indicates that matches should be highlighted using ASCII coding in the result test.
     */ ANSI = 'ansi' } category export enum SearchScanConsistency { /**
     * Indicates that no specific consistency is required, this is the fastest
     * options, but results may not include the most recent operations which have
     * been performed.
     */ NotBounded = 'not_bounded' , /**
     * Indicates that the results to the query should include all operations that
     * have occurred up until the query was started.  This incurs a performance
     * penalty of waiting for the index to catch up to the most recent operations,
     * but provides the highest level of consistency.
     */ RequestPlus = 'request_plus' } category export interface SearchQueryOptions { /**
     * Specifies the number of results to skip from the index before returning
     * results.
     */ skip ? : number ; /**
     * Specifies the limit to the number of results that should be returned.
     */ limit ? : number ; /**
     * Configures whether the result should contain the execution plan for the query.
     */ explain ? : boolean ; /**
     * Specifies how the highlighting should behave.  Specifically which mode should be
     * used for highlighting as well as which fields should be highlighted.
     */ highlight ? : { style ? : HighlightStyle ; fields ? : string [ ] ; } ; /**
     * Specifies the collections which should be searched as part of the query.
     */ collections ? : string [ ] ; /**
     * Specifies the list of fields which should be searched.
     */ fields ? : string [ ] ; /**
     * Specifies any facets that should be included in the query.
     */ facets ? : { [ name ] : SearchFacet ; } ; /**
     * Specifies a list of fields or SearchSort's to use when sorting the result sets.
     */ sort ? : string [ ] | SearchSort [ ] ; /**
     * Specifies that scoring should be disabled.  This improves performance but makes it
     * impossible to sort based on how well a particular result scored.
     */ disableScoring ? : boolean ; experimental includeLocations ? : boolean ; see SearchScanConsistency consistency ? : SearchScanConsistency ; see MutationState consistentWith ? : MutationState ; /**
     * Specifies any additional parameters which should be passed to the query engine
     * when executing the query.
     */ raw ? : { [ key ] : any ; } ; /**
     * The parent tracing span that this operation will be part of.
     */ parentSpan ? : RequestSpan ; /**
     * The timeout for this operation, represented in milliseconds.
     */ timeout ? : number ; }