Bu: facet search values change when browser is refreshed
Closed this issue · 7 comments
There is a BUG in the Facets Search.
Steps to reproduce:
- Search by the term "test" and press return. Now take not of the values in the "Categories" Facet in the right of the screen
- Hit the browser refresh, and you will notice that the "Categories" Facet values have changed !
I'm pretty sure the issue is that there is no stable secondary sort of the terms with the same counts. When I refresh it, occasionally the categories with count = 2 change.
Is this the problem you're reporting?
If so I believe it is a duplicate of this bug: blevesearch/bleve#335
Mhh I read #335.
For me, the problem is not just the ordering or counts. I am getting different actual Categories each time:
Use this url: http://localhost:8099/search/?q=test&p=1
Refresh on that URL and i get:
Testing and automation (6)
Open Document editors (3)
Graphics (2)
PostgreSQL (2)
Lightning talks (2)
a second later, I refresh on the same URL and i get:
Testing and automation (6)
Open Document editors (3)
Perl (2)
Lightning talks (2)
Geospatial (2)
I still think its the ordering. The request shows the top 5 categories, and we sort by the count. The first two are obviously 'Testing and automation' with count 6 and 'Open Document editors' with count 3. That leaves 3 spots remaining, but there are more than 3 categories that all have the count of 2.
How does it decide which to show? It doesn't, that is why sometimes you see different category names. If we imposed a secondary sort on the categories after the sort by count, it would give deterministic output.
Thanks for the explanation. Make sense now.
I was playing with it, with a colleague today at work, and testing at the JSON level, and we were thinking "thank god its Friday, because we see things" :)
If you can do that fix would be great.
I tried this again today, as i need to start using facet search for the project i am working on.
I did a go get -v on the various bleve repos to update them.
In fosdem-search repo, go build and then run ./fosdem-search, to see if the UI bug is still there. Yes i am still getting it.
Any chance this could be fixed ? Or maybe it already has been ?
I have pushed a fix to blevesearch/bleve#335 I have verified fosdem-search locally, but not redeployed the hosted version.
Thanks marty. Seems to be working on my end..