website icon indicating copy to clipboard operation
website copied to clipboard

Search returns incomplete results

Open LightIsLife opened this issue 6 years ago • 6 comments

Just noticed that searching the docs for "Profile" does not deliver the link where this new concept is explained. Using the search function, I was expecting to find this link: https://www.openhab.org/docs/configuration/items.html#profiles

However, this link was not returned by the search, see screenshot below: screen shot 2018-12-31 at 10 10 02 am

LightIsLife avatar Jan 04 '19 14:01 LightIsLife

Indeed. My guess is it's simply not prominent enough yet to have a good ranking in the index. I don't know nor control how Algolia works in this matter. Maybe @Shipow or @s-pace can provide more insight.

But I can confirm this paragrapg is indeed indexed because searching for "built-in profiles" or "profiles specified" or "rawbutton-toggle-switch" returns results. I don't have a good miracle suggestion, maybe the title should be changed to "Defining Profiles" or something similar.

ghys avatar Jan 04 '19 22:01 ghys

👋 @LightIsLife, @ghys has well described the situation here. The level of the word you are looking for is wrapped in a <h4/> tag, that is to say a lvl5 in your DocSearch hierarchy defined by your configuration. While the current most popular result here is wrapped in a <h2/> tag, that is to say a lvl2 in the DocSearch hierarchy. This is why it is ranked higher.

The expected record is indexed but ignored missing because, by default, we only display the top 5 best records.

You can change the HTML tag wrapping the expected record of your website or you can also change the hitsPerPage parameter from the DocSearch JS snippet included in your page.

s-pace avatar Jan 05 '19 13:01 s-pace

Thanks for this well explanation. :)

Confectrician avatar Jan 05 '19 13:01 Confectrician

Thanks all, much appreciated and I learned a lot. As a user experience, however, this begs the question of utility. "Profiles" have been recently introduced as a new and exciting concept.....but I cannot find them easily in the docs...they are not listed on the sidebar....and the search function turns up nothing. I am sure I am not the only one frustrated by this. Honestly, I am rather dealing with more returns that not finding what I am looking for. Right now, it is not apparent for the user that the search results are deliberately limited to the top 5.....again, as an end-user, I simply would take away that it is not the docs. Can we not offer the top, say, 10-20 results....5 is just not cutting it.

LightIsLife avatar Jan 05 '19 16:01 LightIsLife

Hey @LightIsLife,

Of course this is a valuable point. We introduced algolia a short time ago and so it is possible that we have to adapt the settings. I think this will not be the last time, we have to edit something.

I think 10 results should be a good compromise. More content and still a dropdown that is not too big.

Confectrician avatar Jan 05 '19 17:01 Confectrician

As long as it's still ok on phones and so on.

ghys avatar Jan 05 '19 17:01 ghys