Binary file not shown.
Binary file not shown.
@@ -27,7 +27,7 @@ namespace umbraco.presentation.umbraco.Search
|
||||
|
||||
context.Response.ContentType = "application/json";
|
||||
|
||||
var txt = UmbracoContext.Current.Request["q"];
|
||||
var txt = UmbracoContext.Current.Request["q"].ToLower();
|
||||
|
||||
//the app can be Content or Media only, otherwise an exception will be thrown
|
||||
var app = "Content";
|
||||
@@ -35,7 +35,7 @@ namespace umbraco.presentation.umbraco.Search
|
||||
{
|
||||
app = UmbracoContext.Current.Request["app"];
|
||||
}
|
||||
IndexType indexType = (IndexType)Enum.Parse(typeof(IndexType), app);
|
||||
|
||||
int limit;
|
||||
if (!int.TryParse(UmbracoContext.Current.Request["limit"], out limit))
|
||||
{
|
||||
@@ -44,7 +44,7 @@ namespace umbraco.presentation.umbraco.Search
|
||||
|
||||
//if it doesn't start with "*", then search only nodeName and nodeId
|
||||
var internalSearcher = UmbracoContext.Current.InternalSearchProvider;
|
||||
var criteria = internalSearcher.CreateSearchCriteria(indexType);
|
||||
var criteria = internalSearcher.CreateSearchCriteria(app);
|
||||
IEnumerable<SearchResult> results;
|
||||
if (txt.StartsWith("*"))
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace umbraco.presentation.dialogs
|
||||
|
||||
private void doSearch()
|
||||
{
|
||||
string query = keyword.Text;
|
||||
string query = keyword.Text.ToLower();
|
||||
|
||||
//the app can be Content or Media only, otherwise an exception will be thrown
|
||||
var app = "Content";
|
||||
@@ -42,11 +42,10 @@ namespace umbraco.presentation.dialogs
|
||||
{
|
||||
app = UmbracoContext.Current.Request["app"];
|
||||
}
|
||||
IndexType indexType = (IndexType)Enum.Parse(typeof(IndexType), app);
|
||||
|
||||
|
||||
//if it doesn't start with "*", then search only nodeName and nodeId
|
||||
var internalSearcher = UmbracoContext.Current.InternalSearchProvider;
|
||||
var criteria = internalSearcher.CreateSearchCriteria(indexType);
|
||||
var criteria = internalSearcher.CreateSearchCriteria(app);
|
||||
IEnumerable<SearchResult> results;
|
||||
if (query.StartsWith("*"))
|
||||
{
|
||||
|
||||
@@ -123,7 +123,7 @@ namespace umbraco
|
||||
XmlDocument xd = new XmlDocument();
|
||||
if (BasePages.BasePage.ValidateUserContextID(ContextID))
|
||||
{
|
||||
return doQuery(Query, xd, StartNodeId);
|
||||
return doQuery(Query.ToLower(), xd, StartNodeId);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -140,7 +140,7 @@ namespace umbraco
|
||||
{
|
||||
//if the query starts with "*" then query all fields
|
||||
var internalSearcher = UmbracoContext.Current.InternalSearchProvider;
|
||||
var criteria = internalSearcher.CreateSearchCriteria(IndexType.Content);
|
||||
var criteria = internalSearcher.CreateSearchCriteria(IndexTypes.Content);
|
||||
IEnumerable<SearchResult> results;
|
||||
if (Query.StartsWith("*"))
|
||||
{
|
||||
@@ -148,7 +148,7 @@ namespace umbraco
|
||||
}
|
||||
else
|
||||
{
|
||||
var operation = criteria.NodeName(Query);
|
||||
var operation = criteria.NodeName(Query.ToLower());
|
||||
if (StartNodeId > 0)
|
||||
{
|
||||
operation.Or().Id(StartNodeId);
|
||||
|
||||
Reference in New Issue
Block a user