protected LuceneQuery GetQuery(LuceneQuery contentQuery, int?seniorityIndex, float sigma) { if (!seniorityIndex.HasValue) { return(contentQuery); } var seniorityQuery = new ValueSourceQuery(new IntFieldSource(_fieldName)); return(new SeniorityIndexQuery(contentQuery, seniorityQuery, seniorityIndex.Value, sigma)); }
private static void VisitQuery(ValueSourceQuery query, AzureQueryLogger.IndentedTextWriter writer) { }
internal SeniorityIndexQuery(LuceneQuery subQuery, ValueSourceQuery valueSourceQuery, int seniorityIndex, float sigma) : base(subQuery, valueSourceQuery) { _seniorityIndex = seniorityIndex; _sigma = sigma; }
public virtual Query VisitValueSourceQuery(ValueSourceQuery valueSourceq) { throw new NotImplementedException(); }
public virtual Query VisitValueSourceQuery(ValueSourceQuery valueSourceq) { throw new SnNotSupportedException(); }
/// <summary> /// 使用文档单独增加的评分列进行自定义评分 /// FieldScoreQuery fieldScoreQuery = new FieldScoreQuery("sore", FieldScoreQuery.Type.INT);//FieldScoreQuery.Type.BYTE;表示字符串类型排序 /// </summary> /// <param name="language"></param> /// <param name="subQuery"></param> /// <param name="valSrcQuery">创建一个评分列</param> public CustomScoreQueryEx(string language, Query subQuery, ValueSourceQuery valSrcQuery) : base(subQuery, valSrcQuery) { this._language = language; }