(query-parser) Remove test that is no longer relevant

This commit is contained in:
Viktor Lofgren 2024-09-10 10:35:56 +02:00
parent 35f49bbb60
commit 99523ca079

View File

@ -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;