Hello, guys! Very strange problem with Examine. When I create a node and give it name like "New", everything works just fine, when I give it name "New node" - two words with white space - everything works fine, but when I give it name "New 10" - word whitespace and a number, so examine cannot find such node
var query = ExamineManager.Instance.CreateSearchCriteria().Field("nodeTypeAlias", nodeAlias).And()
.Field("nodeName", nodeName)
.Compile();
var nodesCollection = umbracoHelper.Search(query); so when nodeName field has word plus whitespace plus a number this query does not find anything, I wonder what it can be. I guess that it has to do with the way Examine create index for nodeName, and if node name consists of a word and whitespace and a number, it creates the wrong index. Could you tell me exactly what is the problem?
Examine search problem
Hello, guys! Very strange problem with Examine. When I create a node and give it name like "New", everything works just fine, when I give it name "New node" - two words with white space - everything works fine, but when I give it name "New 10" - word whitespace and a number, so examine cannot find such node
var query = ExamineManager.Instance.CreateSearchCriteria().Field("nodeTypeAlias", nodeAlias).And() .Field("nodeName", nodeName) .Compile(); var nodesCollection = umbracoHelper.Search(query);
so when nodeName field has word plus whitespace plus a number this query does not find anything, I wonder what it can be. I guess that it has to do with the way Examine create index for nodeName, and if node name consists of a word and whitespace and a number, it creates the wrong index. Could you tell me exactly what is the problem?You may have to split your search term up into an array and add wildcards. This post does something similar https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/70554-examine-search-with-whitespace#comment-227241
Alternatively you could try adding quotes to your search string such as
is working on a reply...