Skip to content

Commit

Permalink
Fix default params in webapp (#2498)
Browse files Browse the repository at this point in the history
* updated k1 = 0.9 and b = 0.4
* updated ControllerTest to match updated params
  • Loading branch information
16BitNarwhal authored May 15, 2024
1 parent 592b350 commit f5acf4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/java/io/anserini/server/SearchService.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
public class SearchService {

final private String indexDir;
final private float k1 = 0.82f;
final private float b = 0.68f;
final private float k1 = 0.9f;
final private float b = 0.4f;

public SearchService(String prebuiltIndex) {
PrebuiltIndexHandler handler = new PrebuiltIndexHandler(prebuiltIndex);
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/anserini/server/ControllerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void testSearch() throws Exception {
List<QueryResult> results = controller.search(null, "Albert Einstein");

assertEquals(results.size(), 10);
assertEquals(results.get(0).getDocid(), "3075155");
assertEquals(results.get(0).getDocid(), "3553430");
}

@Test
Expand Down

0 comments on commit f5acf4c

Please sign in to comment.