mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
#17436: Filtering search results on current culture
Work Item: 17436 --HG-- branch : 1.x
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Orchard.Collections;
|
using Orchard.Collections;
|
||||||
using Orchard.Indexing;
|
using Orchard.Indexing;
|
||||||
@@ -34,14 +35,12 @@ namespace Orchard.Search.Services {
|
|||||||
var searchBuilder = Search().Parse(searchFields, query);
|
var searchBuilder = Search().Parse(searchFields, query);
|
||||||
|
|
||||||
if (filterCulture) {
|
if (filterCulture) {
|
||||||
/* TODO: (sebros) Implementations details after Alpha
|
|
||||||
var culture = _cultureManager.GetSiteCulture();
|
var culture = _cultureManager.GetSiteCulture();
|
||||||
|
|
||||||
// use LCID as the text representation gets analyzed by the query parser
|
// use LCID as the text representation gets analyzed by the query parser
|
||||||
searchBuilder
|
searchBuilder
|
||||||
.WithField("culture", CultureInfo.GetCultureInfo(culture).LCID)
|
.WithField("culture", CultureInfo.GetCultureInfo(culture).LCID)
|
||||||
.AsFilter();
|
.AsFilter();
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var totalCount = searchBuilder.Count();
|
var totalCount = searchBuilder.Count();
|
||||||
|
|||||||
Reference in New Issue
Block a user