将 SolrQueryByRange 组合到 solr.query 中
我正在使用 solrnet 来设计我的搜索引擎。现在我需要根据日期范围进行查询。我的查询语句是这样的。
var matchingProducts = solr.Query(BuildQuery(parameters), new QueryOptions
{
FilterQueries = BuildFilterQueries(parameters),
Rows = parameters.PageSize,
Start = start,
OrderBy = GetSelectedSort(parameters),
SpellCheck = new SpellCheckingParameters { Collate = false },
Highlight = new HighlightingParameters
{
Fields = new[] { strpara },
},
Facet = new FacetParameters
{
Queries = AllFacetFields.Except(SelectedFacetFields(parameters))
.Select(f => new SolrFacetFieldQuery(f) { MinCount = 1 })
.Cast<ISolrFacetQuery>().ToList(),
},
}
);
现在如何将我的“SolrQueryByRange”命令包含到其中?
提前致谢。
问候
维涅什
I am using solrnet to design my search engine. Now I have a requirement to query based on a date range. I have my query statement go like this.
var matchingProducts = solr.Query(BuildQuery(parameters), new QueryOptions
{
FilterQueries = BuildFilterQueries(parameters),
Rows = parameters.PageSize,
Start = start,
OrderBy = GetSelectedSort(parameters),
SpellCheck = new SpellCheckingParameters { Collate = false },
Highlight = new HighlightingParameters
{
Fields = new[] { strpara },
},
Facet = new FacetParameters
{
Queries = AllFacetFields.Except(SelectedFacetFields(parameters))
.Select(f => new SolrFacetFieldQuery(f) { MinCount = 1 })
.Cast<ISolrFacetQuery>().ToList(),
},
}
);
Now how do I include my "SolrQueryByRange" command into this?
Thanks in advance.
Regards
Vignesh
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据您想要实现的目标,SolrQueryByRange 可以放入 BuildQuery 函数或 BuildFilterQueries 函数中
Depending on what you want to achieve, a SolrQueryByRange can go in the BuildQuery function or the BuildFilterQueries function