From 99523ca0798962b6cdb39a8bc67ddb71ff6b86d3 Mon Sep 17 00:00:00 2001 From: Viktor Lofgren Date: Tue, 10 Sep 2024 10:35:56 +0200 Subject: [PATCH] (query-parser) Remove test that is no longer relevant --- .../query/svc/QueryFactoryTest.java | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/code/functions/search-query/test/nu/marginalia/query/svc/QueryFactoryTest.java b/code/functions/search-query/test/nu/marginalia/query/svc/QueryFactoryTest.java index 4f2b59b0..74345adc 100644 --- a/code/functions/search-query/test/nu/marginalia/query/svc/QueryFactoryTest.java +++ b/code/functions/search-query/test/nu/marginalia/query/svc/QueryFactoryTest.java @@ -2,7 +2,6 @@ package nu.marginalia.query.svc; import nu.marginalia.WmsaHome; import nu.marginalia.api.searchquery.model.query.QueryParams; -import nu.marginalia.api.searchquery.model.query.SearchPhraseConstraint; import nu.marginalia.api.searchquery.model.query.SearchSpecification; import nu.marginalia.api.searchquery.model.results.ResultRankingParameters; import nu.marginalia.functions.searchquery.QueryFactory; @@ -130,24 +129,6 @@ public class QueryFactoryTest { assertEquals(2000, size.value()); } - @Test - public void testQuotedStopwords() { - { - // the is a stopword, so it should generate an ngram search term - var specs = parseAndGetSpecs("\"the shining\""); - assertEquals("( shining | the_shining )", specs.query.compiledQuery); - } - - { - // tde isn't a stopword, so we should get the normal behavior - var specs = parseAndGetSpecs("\"tde shining\""); - assertEquals("( shining tde | tde_shining )", specs.query.compiledQuery); - assertEquals(List.of("tde_shining"), specs.query.searchTermsPriority); - assertEquals(List.of(new SearchPhraseConstraint.Mandatory(List.of("tde", "shining"))), specs.query.phraseConstraints); - } - } - - @Test public void testParseQualityEq() { var quality = parseAndGetSpecs("q=2000").quality;