OCL Searches Gone Wrong

@Sny I noticed that, when searching the openmrs org for “lab”, I didn’t get any results, even though there are clearly collections that have “lab” in the collection id and name. I had to search “basic” to get that BasicLabTests collection to appear in search results. Does OCL not do “contains” results? It seems to be only including “starts with” results.

Is this an index issue for this collection only, or is this a global search/index issue?

@jamlung Right now the search does a trailing wildcard search, in this example, lab*, which doesn’t match anything. If you search for *lab it will return results.

This is throughout our search, wildcard is applied only for trailing.
If lab had been a proper word anywhere in Name, it would have matched exactly.

Gotcha, thanks for the explanation. Do you think it makes sense for us to include leading matches in our searches? My gut feeling is yes, but I don’t know if that would cause any unintended consequences. @jon What do you think?

@Sny @jamlung From the screenshot, the record does have “lab” as it’s own word in the full name (Full Name = “Basic Lab Tests”). This should show up even without the leading wildcard search.

@jon Good catch. Thats full_name field and we are not searching on it. Adding that, soon will be available. That should fix it.

1 Like