本文整理汇总了C#中ID.ToLuceneId方法的典型用法代码示例。如果您正苦于以下问题:C# ID.ToLuceneId方法的具体用法?C# ID.ToLuceneId怎么用?C# ID.ToLuceneId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ID
的用法示例。
在下文中一共展示了ID.ToLuceneId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Id
public static TermQuery Id(this IQueryBuilder inputQueryBuilder, ID itemId, Matches occur = Matches.NotSet, float? boost = null, string key = null)
{
string luceneItemId = itemId.ToLuceneId();
return inputQueryBuilder.Term(SitecoreFields.Id, luceneItemId, occur, boost, key);
}
示例2: Ancestor
/// <summary>
/// Gets a query representing
/// </summary>
/// <param name="inputQueryBuilder"></param>
/// <param name="ancestorId"></param>
/// <param name="occur"></param>
/// <param name="boost"></param>
/// <param name="key"></param>
/// <returns></returns>
public static TermQuery Ancestor(this IQueryBuilder inputQueryBuilder, ID ancestorId, Matches occur = Matches.NotSet, float? boost = null, string key = null)
{
string ancestorIdString = ancestorId.ToLuceneId();
return inputQueryBuilder.Term(SitecoreFields.Path, ancestorIdString, occur, boost, key);
}
示例3: Field
public static Query Field(this IQueryBuilderIndividual inputQueryBuilder, string fieldName, ID value, Matches occur = Matches.NotSet, float? boost = null, string key = null)
{
return inputQueryBuilder.Term(GetEncodedFieldName(fieldName), value.ToLuceneId(), occur, boost, key);
}
示例4: Parent
public static TermQuery Parent(this IQueryBuilder inputQueryBuilder, ID parentId, Matches occur = Matches.NotSet, float? boost = null, string key = null)
{
string parentIdString = parentId.ToLuceneId();
return inputQueryBuilder.Term(SitecoreFields.Parent, parentIdString, occur, boost, key);
}