20 using System.Collections.Generic;
24 using Lucene.Net.Search;
25 using Lucene.Net.Analysis;
26 using Lucene.Net.Index;
28 namespace Lucene.Net.Search.Similar
38 private String likeText;
39 private String[] moreLikeFields;
41 float percentTermsToMatch = 0.3f;
42 int minTermFrequency = 1;
43 int maxQueryTerms = 5;
44 ISet<string> stopWords = null;
55 this.likeText = likeText;
56 this.moreLikeFields = moreLikeFields;
57 this.analyzer = analyzer;
82 public override String ToString(String field)
84 return "like:" + likeText;
87 public float PercentTermsToMatch
89 get {
return percentTermsToMatch; }
90 set { this.percentTermsToMatch = value; }
95 get {
return analyzer; }
96 set { this.analyzer = value; }
99 public string LikeText
101 get {
return likeText; }
102 set { this.likeText = value; }
105 public int MaxQueryTerms
107 get {
return maxQueryTerms; }
108 set { this.maxQueryTerms = value; }
111 public int MinTermFrequency
113 get {
return minTermFrequency; }
114 set { this.minTermFrequency = value; }
117 public String[] GetMoreLikeFields()
119 return moreLikeFields;
122 public void SetMoreLikeFields(String[] moreLikeFields)
124 this.moreLikeFields = moreLikeFields;
126 public ISet<string> GetStopWords()
130 public void SetStopWords(ISet<string> stopWords)
132 this.stopWords = stopWords;
135 public int MinDocFreq
137 get {
return minDocFreq; }
138 set { this.minDocFreq = value; }