Try our conversational search powered by Generative AI!

Unified Search - Getting search hits on parts of name space of model

var query = SearchClient.Instance
                .WildcardFor(string.Format("*{0}*", queryString))


On my Unified Search page I'm getting search hits on fields in the index I don't want to search in.


Search examples and result:

"Model" -> Result is all the pages and files in the solution

"ArticlePage" -> Result is all pages of type ArticlePage


I'm guessing it has to do with these (or similar) values in the Index:

"$type": "Kirken.Models.Pages.ArticlePage, Kirken"
"_TypeShortName": "ArticlePage",


The text "Model" and "ArticlePage" is not written on any page or in any file, so I sholdn't get any hits searching for them.

Feb 04, 2014 17:38

What's written in "WildCardFor"? This would typically happend if you have not specified .InField(...) values if you have another .For(..) in your WildCardFor method.

Feb 05, 2014 8:38

I found my WildCard method here:


public static IQueriedSearch<TSource, QueryStringQuery> WildcardFor<TSource>(this ITypeSearch<TSource> search, string queryString)
            return new Search<TSource, QueryStringQuery>(search, context =>
                var query = new QueryStringQuery(queryString); context.RequestBody.Query = query;


Feb 05, 2014 9:26

If you read the first post in that thread, the goal is to search in all fields. In your case, you need to limit the wildcard search to certain fields. Here is an example on how to do just that:

Edited, Feb 05, 2014 9:32


That makes sense. Thanks.

Feb 10, 2014 14:16
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.