Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Free text search




I use the following code to search data

var pages = client.Search<PageData>()

One page contains word 'Chicken' in XhtmlString property.

Data is indexed and this word is in the index.

If I'm looking through 'Explore Index' (application/Find/IndexOverview/Explore) then I got this page in results.


Why sometimes the code shown above does not find this page?


I hope for your help.

Apr 23, 2014 16:09

Exactly what are you searching for, is it Chicken?

Looking at the question I am thinking that you should use UnifiedSearch instead of Search, since you are searching all pagedata in all fields. You should also try to use SearchClient.Instance instead of an instans of client since there are a lot of conversions that you might missing.
To write the question you do with UnifiedSearch it should be:

That will not give you back Pagedata, but it is not hard to convert it, see more info here:

Apr 23, 2014 16:45

Hi Henrik,

I try the proposed version, but I can not get the link to the page (ContentReference) or IContent.

What better way to get IContent data from UnifiedSearchHit?


Edited, Apr 24, 2014 9:37

If your using the UnifiedSearch you should be getting a ISearchContent back, so unless your doing some projections you should have a SearchHitUrl property. Does this not exist?

Apr 24, 2014 9:50

I have following "/en/recipe-listing/resipe-3/product-1/" but I need ContentReference.

Edited, Apr 24, 2014 9:57

UnifiedSearch does not give back a contentReference because it can return files and so on (maby the latest version do, I have not tried that). So if you need that, you have to do a extension method that get the content by the url.

Apr 24, 2014 10:02

Read Joels good article on this:

Apr 24, 2014 10:10

Thanks for your help and for what you sent me in the right direction

Apr 25, 2014 9:36
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.