November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
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:
SearchClient.Instance.UnifiedSearchFor(model.SearchText).GetResult();
That will not give you back Pagedata, but it is not hard to convert it, see more info here:
http://world.episerver.com/Documentation/Items/Developers-Guide/EPiServer-Find/75/DotNET-Client-API/Searching/Unified-search/
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?
I have following "/en/recipe-listing/resipe-3/product-1/" but I need ContentReference.
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.
Read Joels good article on this:
http://joelabrahamsson.com/new-in-episerver-find-unified-search/
Hi,
I use the following code to search data
var pages = client.Search<PageData>()
.For(model.SearchText)
.InAllField()
.GetPagesResult();
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.