Relevance not returning all results

Hello,

When I run this relevance:

number of bes computers

I get 175890.

(value of result from (bes properties “IBM::Asset::Owner”) of it | “no result”, value of result from (bes properties “Win7CbSensorID”) of it | “no result”, value of result from (bes properties “LinuxCbSensorID”) of it | “no result”) of bes computers

I receive only 13883 responses.

How do I fix this?

I don’t think I could put it any better than @brolly33 did in his blog, check out https://www.ibm.com/developerworks/community/blogs/e9d21113-aa93-467e-ac77-a0d20a21eaec/entry/Session_Relevance_Computer_Properties_query_Efficiency?lang=en for handling multiple properties, multiple results, missing properties, and no result, in a very efficient way.

5 Likes

Thank you so much. I adapted that code to what I need, I now have

(name of item 0 of it|“missing Name” , (concatenation “;” of values of results (item 0 of it, elements of item 1 of it)) , (if (size of item 2 of it = 1) then ((if it = “” then “Property 2: No values” else it) of concatenation “;” of values of results (item 0 of it, elements of item 2 of it)) else (if (size of item 2 of it > 1) then (("Property 2 duplicates: " & concatenation “|” of ((name of it) & “=” & (id of it as string)) of elements of item 2 of it) as string) else (“Property 2 does not exist”))) , (if (size of item 3 of it = 1) then ((if it = “” then “Property 3: No values” else it) of concatenation “;” of values of results (item 0 of it, elements of item 3 of it)) else (if (size of item 3 of it > 1) then (("Property 3 duplicates: " & concatenation “|” of ((name of it) & “=” & (id of it as string)) of elements of item 3 of it) as string) else (“Property 3 does not exist”))) ) of ( elements of item 0 of it ,item 1 of it ,item 2 of it ,item 3 of it ) of ( set of BES computers , set of bes properties whose (name of it as lowercase = (“Win7CbSensorID”) as lowercase) , set of bes properties whose (name of it as lowercase = (“LinuxCbSensorID”) as lowercase) , set of bes properties whose (name of it as lowercase = (“IBM::Asset::Owner”) as lowercase) )

as my relevance.

It seems to be working - I have 176598 responses now!

Summary

This text will be hidden

2 Likes