Represents the relevance of a search result with two states: non-finalized and finalized. When the state is non-finalized, the value of the relevance has an unknown meaning. When the state is finalized, the value of the relevance is a percentage value representing the relevance of a search result.
All members are not thread-safe.
예제 #1
0
		/// <summary>
		/// Initializes a new instance of the <see cref="SearchResult" /> class.
		/// </summary>
		/// <param name="document">The document the result refers to.</param>
		/// <remarks>The relevance is initially set to <b>0</b>.</remarks>
		/// <exception cref="ArgumentNullException">If <paramref name="document"/> is <c>null</c>.</exception>
		public SearchResult(IDocument document) {
			if(document == null) throw new ArgumentNullException("document");

			this.document = document;
			this.matches = new WordInfoCollection();
			this.relevance = new Relevance(0);
		}
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SearchResult" /> class.
        /// </summary>
        /// <param name="document">The document the result refers to.</param>
        /// <remarks>The relevance is initially set to <b>0</b>.</remarks>
        /// <exception cref="ArgumentNullException">If <paramref name="document"/> is <c>null</c>.</exception>
        public SearchResult(IDocument document)
        {
            if(document == null) throw new ArgumentNullException("document");

            this.document = document;
            this.matches = new WordInfoCollection();
            this.relevance = new Relevance(0);
        }