Mike-Heneghan / ALISS

ALISS (A Local Information System for Scotland) is a service to help you find help and support close to you when you need it most.
https://aliss.org
0 stars 0 forks source link

Best out of n for the test_search.py test keyword order. #37

Closed Mike-Heneghan closed 5 years ago

Mike-Heneghan commented 5 years ago

As one of the methods has inconsistent results it would be best to run it a number of times and decide on average whether it passes or not.

Mike-Heneghan commented 5 years ago

As seen below the test results are different everytime although they same to be consistent for each test whether they are ran once or 100 times. Hence the best x out of y approach may not be suitable.

Physical Fun
{'index': 'search', 'id': 'aa0d112d-3c25-4fed-9d58-1f6d4d694299', 'score': 25.531137, 'doc_type': 'service'}
Step Fit 1
{'index': 'search', 'id': '592b84ef-91e3-4771-94de-57d390a47546', 'score': 15.762463, 'doc_type': 'service'}
Step Fit 2
{'index': 'search', 'id': 'ddfd5ae5-dd5c-4270-91a3-00489c73b9c1', 'score': 10.232726, 'doc_type': 'service'}
Physical Fun
{'index': 'search', 'id': '59076b37-bd0c-4661-b2d8-9a4d63edc49c', 'score': 29.747053, 'doc_type': 'service'}
Step Fit 1
{'index': 'search', 'id': 'fed7f4bd-3df4-447e-9509-02d859ad8988', 'score': 24.530806, 'doc_type': 'service'}
Step Fit 2
{'index': 'search', 'id': '761c50cb-abaa-4109-8aac-0f3ebe06f4c1', 'score': 9.727386, 'doc_type': 'service'}
Physical Fun
{'index': 'search', 'id': '4950b7df-d41c-47ad-b80f-43dec2a014ec', 'score': 26.986788, 'doc_type': 'service'}
Step Fit 1
{'index': 'search', 'id': '57ba7376-2177-40cb-87dc-3ae2ae031678', 'score': 22.103374, 'doc_type': 'service'}
Step Fit 2
{'index': 'search', 'id': '2206dbaf-93d4-4f1b-a89e-1835dc485fcf', 'score': 11.097924, 'doc_type': 'service'}
Mike-Heneghan commented 5 years ago

As the results are always consistent in each test whether the operation is run once or 100 times there is no value in runnning a loop within the test.

Also checked out the master and tried running the tests again and couldn't successfull get a failure. Could potentially be because of the update of ElasticSearch? Or an improvement with the queries.

Mike-Heneghan commented 5 years ago

Merged into master