[ https://issues.apache.org/jira/browse/SOLR-10323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15936766#comment-15936766 ]
Amrit Sarkar commented on SOLR-10323: ------------------------------------- The issue seems to be bigger than that: In SpellingQueryConverterTest::testNumeric() {code} @Test public void testNumeric() throws Exception { SpellingQueryConverter converter = new SpellingQueryConverter(); converter.init(new NamedList()); converter.setAnalyzer(new WhitespaceAnalyzer()); String[] queries = {"12345", "foo:12345", "12345 67890", "foo:(12345 67890)", "foo:(life 67890)", "12345 life", "+12345 +life", "-12345 life"}; int[] tokensToExpect = {1, 1, 2, 2, 2, 2, 2, 2}; for (int i = 0; i < queries.length; i++) { Collection<Token> tokens = converter.convert(queries[i]); System.out.println("tkns for "+queries[i]+" >> "+tokens); assertTrue("tokens Size: " + tokens.size() + " is not: " + tokensToExpect[i], tokens.size() == tokensToExpect[i]); } } {code} {code} tkns for 12345 >> [12345] tkns for foo:12345 >> [:12345] tkns for 12345 67890 >> [12345, 67890] tkns for foo:(12345 67890) >> [(12345, 67890] tkns for foo:(life 67890) >> [(life, 67890] tkns for 12345 life >> [12345, life] tkns for +12345 +life >> [+12345, +life] tkns for -12345 life >> [-12345, life] {code} Observe *(* coming anywhere, braces are not handled too. Test cases are not hard enough there. > SpellingQueryConverter does not remove ":" char when using fielded queries > -------------------------------------------------------------------------- > > Key: SOLR-10323 > URL: https://issues.apache.org/jira/browse/SOLR-10323 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Components: spellchecker > Affects Versions: 6.2.1 > Reporter: Michael Pellegrini > > If you pass a fielded query to {{SpellingQueryConverter.convert}}, it returns > a token that is prefixed with a ":" char. > Example: The query "foo:bar" is converted to ":bar" > This bug seems to have been introduced by the fix for SOLR-2556. Before this > patch, {{SpellingQueryConverter.convert}} returned tokens without the leading > colon char. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org