I've been trying my luck with examine in Umbraco 6.0.5 for a couple of days now, without 100% success. Which is to say, I managed to get some search results, but not always the correct ones. First I thaught it was my indexes that was set up incorrect, but it doesnt appear so.
My seach criteria looks something like this:
var query = searchCriteria .Field("nodeName", "skandinavien").Or() .Field("bodyText", "skandinavien") .Compile();
I know for a fact that at least one page in my system contains the word "skandinavien" in the field bodyText, but the seachquery above returns 0 results.
If I however do this:
var query = searchCriteria .Field("bodyText", "skandinavien") .Compile();
I get 3 results.
In other words it seems to ignore the bodytext parameter in the first query.
Examine search multiple fields
Hi.
I've been trying my luck with examine in Umbraco 6.0.5 for a couple of days now, without 100% success. Which is to say, I managed to get some search results, but not always the correct ones. First I thaught it was my indexes that was set up incorrect, but it doesnt appear so.
My seach criteria looks something like this:
I know for a fact that at least one page in my system contains the word "skandinavien" in the field bodyText, but the seachquery above returns 0 results.
If I however do this:
I get 3 results.
In other words it seems to ignore the bodytext parameter in the first query.
Can somebody tell me what I'm doing wrong?
Cheers
- Sune
Fengelz,
It looks like the first query is an And query so its looking for nodeName must contain skandinavien or bodyText. I usually just munge all fields into one field then query on that see http://thecogworks.co.uk/blog/posts/2012/november/examiness-hints-and-tips-from-the-trenches-part-2/
Hi,
try using this:
Thing this will make it work. Had the same problem when tried to use examine the first time.
@Ismail Great article. Hereby bookmarked :)
@David Thanks. That totally did the trick :D
is working on a reply...