Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Romix2017 23 posts 183 karma points
    Nov 22, 2017 @ 18:25
    Romix2017
    0

    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 enter image description here 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?

  • Alex Brown 129 posts 620 karma points
    Nov 23, 2017 @ 21:49
    Alex Brown
    0

    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

    var nodeName = "\"new 10\"";
    
Please Sign in or register to post replies

Write your reply to:

Draft