mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 21:18:58 +00:00
(query-parser) Remove test that is no longer relevant
This commit is contained in:
parent
35f49bbb60
commit
99523ca079
@ -2,7 +2,6 @@ package nu.marginalia.query.svc;
|
|||||||
|
|
||||||
import nu.marginalia.WmsaHome;
|
import nu.marginalia.WmsaHome;
|
||||||
import nu.marginalia.api.searchquery.model.query.QueryParams;
|
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.query.SearchSpecification;
|
||||||
import nu.marginalia.api.searchquery.model.results.ResultRankingParameters;
|
import nu.marginalia.api.searchquery.model.results.ResultRankingParameters;
|
||||||
import nu.marginalia.functions.searchquery.QueryFactory;
|
import nu.marginalia.functions.searchquery.QueryFactory;
|
||||||
@ -130,24 +129,6 @@ public class QueryFactoryTest {
|
|||||||
assertEquals(2000, size.value());
|
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
|
@Test
|
||||||
public void testParseQualityEq() {
|
public void testParseQualityEq() {
|
||||||
var quality = parseAndGetSpecs("q=2000").quality;
|
var quality = parseAndGetSpecs("q=2000").quality;
|
||||||
|
Loading…
Reference in New Issue
Block a user