File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -190,10 +190,16 @@ defmodule PartitionSearchTest do
190190 create_ddoc ( db_name )
191191
192192 url = "/#{ db_name } /_design/library/_search/books"
193+
194+ # score order varies by Lucene version, so captured this order first.
195+ resp = Couch . get ( url , query: % { q: "some:field" } )
196+ assert_on_status ( resp , 200 , "Failed to search on non-partitioned dbs without the limit." )
197+ expected_ids = get_ids ( resp )
198+
199+ # Assert that the limit:3 results are the first 3 results from the unlimited search
193200 resp = Couch . get ( url , query: % { q: "some:field" , limit: 3 } )
194201 assert_on_status ( resp , 200 , "Failed to search on non-partitioned dbs with the limit." )
195- ids = get_ids ( resp )
196- assert Enum . sort ( ids ) == Enum . sort ( [ "bar:1" , "bar:5" , "bar:9" ] )
202+ assert List . starts_with? ( expected_ids , get_ids ( resp ) )
197203 end
198204
199205 @ tag :with_db
You can’t perform that action at this time.
0 commit comments