Пример #1
0
 /// <summary>
 /// Allows setting of additional highlighting on the result set of matching terms.
 /// </summary>
 /// <param name="highLightStyle">The <see cref="HighLightStyle" /> to use.</param>
 /// <returns></returns>
 public ISearchParams Highlighting(HighLightStyle highLightStyle)
 {
     var name = Enum.GetName(typeof (HighLightStyle), highLightStyle);
     if (name != null)
     {
         _highLightStyle = name.ToLowerInvariant();
     }
     return this;
 }
Пример #2
0
        /// <summary>
        /// Allows setting of additional highlighting on the result set of matching terms.
        /// </summary>
        /// <param name="highLightStyle">The <see cref="HighLightStyle" /> to use.</param>
        /// <returns></returns>
        public ISearchOptions Highlighting(HighLightStyle highLightStyle)
        {
            var name = Enum.GetName(typeof(HighLightStyle), highLightStyle);

            if (name != null)
            {
                _highLightStyle = name.ToLowerInvariant();
            }
            return(this);
        }
Пример #3
0
 /// <summary>
 /// Allows setting of additional highlighting on the result set of matching terms.
 /// </summary>
 /// <param name="highLightStyle">The <see cref="HighLightStyle" /> to use.</param>
 /// <param name="fields">The specific terms or fields to highlight.</param>
 /// <returns></returns>
 public ISearchParams Highlighting(HighLightStyle highLightStyle, params string[] fields)
 {
     _highLightStyle = Enum.GetName(typeof(HighLightStyle), highLightStyle);
     if (_highLightFields == null)
     {
         _highLightFields = new List <string>();
     }
     _highLightFields.AddRange(fields);
     return(this);
 }
 /// <summary>
 /// Allows setting of additional highlighting on the result set of matching terms.
 /// </summary>
 /// <param name="highLightStyle">The <see cref="HighLightStyle" /> to use.</param>
 /// <param name="fields">The specific terms or fields to highlight.</param>
 /// <returns></returns>
 public ISearchParams Highlighting(HighLightStyle highLightStyle, params string[] fields)
 {
     _highLightStyle = Enum.GetName(typeof(HighLightStyle), highLightStyle);
     if (_highLightFields == null)
     {
         _highLightFields = new List<string>();
     }
     _highLightFields.AddRange(fields);
     return this;
 }
Пример #5
0
        /// <summary>
        /// Allows setting of additional highlighting on the result set of matching terms.
        /// </summary>
        /// <param name="highLightStyle">The <see cref="HighLightStyle" /> to use.</param>
        /// <param name="fields">The specific terms or fields to highlight.</param>
        /// <returns></returns>
        public ISearchOptions Highlighting(HighLightStyle highLightStyle, params string[] fields)
        {
            var name = Enum.GetName(typeof(HighLightStyle), highLightStyle);

            if (name != null)
            {
                _highLightStyle = name.ToLowerInvariant();
            }
            if (_highLightFields == null)
            {
                _highLightFields = new List <string>();
            }
            _highLightFields.AddRange(fields);
            return(this);
        }
Пример #6
0
        /// <summary>
        /// Constructor for properties with backreference parameter to spellchecker instance.
        /// </summary>
        /// <param name="documentSpellChecker">Spellchecker instance this property instance refers to.</param>
        public SpellCheckerProperties(IDocumentSpellChecker documentSpellChecker)
        {
            this.documentSpellChecker = (DocumentSpellChecker)documentSpellChecker;
            // default for spellchecking
            HighlightColor  hc = HighlightColor.Color(Color.Red);
            UnderlineStyle  us = UnderlineStyle.Wave;
            IHighLightStyle hs = new HighLightStyle();

            hs.LineColor      = hc;
            hs.UnderlineStyle = us;
            this.documentSpellChecker.HighLightStyle = hs;
            ignoreWordsWithDigits = true;
            ignoreUpperCaseWords  = true;
            maxSuggestionsCount   = 25;
            ignoreHtml            = true;
            ignoreList            = new List <string>();
            replaceList           = new Dictionary <string, string>();
            checkInternal         = true;
            if (String.IsNullOrEmpty(this.Dictionary))
            {
                this.Dictionary = System.Threading.Thread.CurrentThread.CurrentUICulture.Name;
            }
        }
 /// <summary>
 /// Allows setting of additional highlighting on the result set of matching terms.
 /// </summary>
 /// <param name="highLightStyle">The <see cref="HighLightStyle" /> to use.</param>
 /// <param name="fields">The specific terms or fields to highlight.</param>
 /// <returns></returns>
 public SearchQuery Highlighting(HighLightStyle highLightStyle, params string[] fields)
 {
     SearchParams.Highlighting(highLightStyle, fields);
     return(this);
 }
 /// <summary>
 /// Allows setting of additional highlighting on the result set of matching terms.
 /// </summary>
 /// <param name="highLightStyle">The <see cref="HighLightStyle" /> to use.</param>
 /// <returns></returns>
 public SearchQuery Highlighting(HighLightStyle highLightStyle)
 {
     SearchParams.Highlighting(highLightStyle);
     return(this);
 }
Пример #9
0
 /// <summary>
 /// Allows setting of additional highlighting on the result set of matching terms.
 /// </summary>
 /// <param name="highLightStyle">The <see cref="HighLightStyle" /> to use.</param>
 /// <param name="fields">The specific terms or fields to highlight.</param>
 /// <returns></returns>
 public SearchQuery Highlighting(HighLightStyle highLightStyle, params string[] fields)
 {
     SearchParams.Highlighting(highLightStyle, fields);
     return this;
 }
Пример #10
0
 /// <summary>
 /// Allows setting of additional highlighting on the result set of matching terms.
 /// </summary>
 /// <param name="highLightStyle">The <see cref="HighLightStyle" /> to use.</param>
 /// <returns></returns>
 public SearchQuery Highlighting(HighLightStyle highLightStyle)
 {
     SearchParams.Highlighting(highLightStyle);
     return this;
 }