I would suggest to make Bloodhound using Whoosh 2.5 (and removing aforementioned workarounds) with search index rebuild when upgrading from setup that uses indexes created with Whoosh 2.4.
Cheers, Andrej On 14 January 2014 12:19, Anže Starič <[email protected]> wrote: > This behaviour with whoosh 2.4 is caused by WhooshEmptyFacetErrorWorkaround. > > Search with facets fails in whoosh 2.4.1 if the field is empty in any > of the returned docs. A workaround was med that fills the field with > string "empty" when the value was not provided. > > The same workaround is used when creating unique id-s (see > _create_unique_id in WhooshBackend). > > If you disabled/removed the workaround, change in unique_id is expected. > > Anze > > > > 2014/1/14 Saint Germain <[email protected]>: >> Hello ! >> >> Yes I also noticed the api change for the score in >> test_can_retrieve_docs. It seems to be more consistent (see >> test_can_return_all_fields which also check to float score) than >> before. >> >> I also noticed that with Whoosh 2.5.6 we have 'unique_id': u'ticket:1' >> instead of 'unique_id': u'empty:ticket:1' in test_can_retrieve_docs. >> It seems to be related to the Whoosh 2.4.1 fix but I am not sure. >> >> Best regards, >> >> On 14 January 2014 09:34, Anže Starič <[email protected]> wrote: >>> As soon as we change the package requirements in bloodhound_search setup.py >>> to >5.1, new version will refuse to install if only whoosh 2.4.1 is >>> installed, so no installations should break. >>> >>> As far as I can tell, Whoosh 2.4 is not supported anymore. No patches have >>> been backported for over a year while Whoosh 2.5+ had 7 releases. I would >>> say that bumping the required version and removing the fixes is the way to >>> go. >>> >>> There is one test that fails though with Whoosh 2.5.6 >>> (WhooshBackendTestCase.test_can_retrieve_docs). It looks like an api change >>> (score used to be unicode, but is now float), but I need to check if that >>> is really the case. >>> >>> >>> Anze >>> >>> >>> 2014/1/14 Ryan Ollos <[email protected]> >>> >>>> On Mon, Jan 13, 2014 at 2:44 PM, Saint Germain <[email protected]> wrote: >>>> >>>> > On Mon, 13 Jan 2014 11:45:40 -0800, Ryan Ollos >>>> > <[email protected]> wrote : >>>> > >>>> > > > Apparently for bloodhound_search, a specific version of Whoosh is >>>> > > > required (2.4.1). >>>> > > > >>>> > > > I noticed the file bloodhound_search/bhsearch/whoosh_fixes.py which >>>> > > > apparently fix some problem in Whoosh (pull request #41). >>>> > > > >>>> > > > Apparently this pull request is already included in Whoosh trunk >>>> > > > (since 2.5.1), so I was wondering if the fix is always necessary >>>> > > > and if Whoosh version > 2.5.1 may be acceptable. >>>> > > > >>>> > > > Is there a thread on the topic where I can understand the problem >>>> > > > and attempt to fix it ? >>>> > > > >>>> > > >>>> > > Nothing I can remember, but you may want to search: >>>> > > http://apache.markmail.org/search/?q=list%3Abloodhound >>>> > > >>>> > > The commit message associated with that file is "Added support for >>>> > > fine-grained permissions to bhsearch", so you may want to search for >>>> > > messages on that topic, or perhaps Anze will chime in. >>>> > > >>>> > > I encourage you to verifying the fixes, add additional tests if >>>> > > needed and we can bump the version in requirements to 2.5.1 if it is >>>> > > working well. >>>> > >>>> > Hello, >>>> > >>>> > The fix was indeed very well done. There is even a test to check that >>>> > the fix is removed in case we don't need it anymore ! ;-) >>>> > >>>> > Now the question would be if we remove the fix or not ? >>>> > I hate to break previous (and working) installation, so I'd prefer to >>>> > keep the fix for those who want to stay with Whoosh 2.4.1. >>>> > However if we keep it, we may end up with some spaghetti code in >>>> > order to manage the different cases (depending on the Whoosh version). >>>> > >>>> > What do you advise ? >>>> > >>>> > Thanks for your help ! >>>> > >>>> >>>> I don't think we should try to support multiple major releases of Whoosh at >>>> this time. We have enough to do without testing and debugging against >>>> multiple versions of Whoosh. >>>> >>>> I guess the question is when is the right time to bump the required version >>>> of Whoosh. That may depend on a number of issues, including at least: >>>> features and performance of the newer versions, how long the Whoosh dev >>>> team will continue to support the 2.4 release line with bugfixes, Python >>>> version compatibility of the newer release . >>>>
