[ https://issues.apache.org/jira/browse/SOLR-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681923#action_12681923 ]
Tom Burton-West commented on SOLR-744: -------------------------------------- I applied both this and LUCENE-1370 and there seems to be some problem with passing arguments from the ShingleFilterFactory to the ShingleFilter. The admin analyzer says that outputUnigramIfNoNgram=true org.apache.solr.analysis.ShingleFilterFactory {outputUnigrams=false, outputUnigramIfNoNgram=true} However, this does not seem to be getting set within the ShingleFilter and the admin analyzer shows nothing coming out of the ShingleFilterFactory when analyzing a query with a single word. when using the admin interface to query a single word, I also get no results. If I hack the patch by always setting outputUnigramsIfNoNgrams to true, everything works fine. (see below) If I am missing something or obviously doing something wrong, please let me know. In the meantime I will try to write a unit test and track down the problem. Is there an already existing unit test I could use as a model? Tom Burton-West ------------------------------------------------------ Hack public void init(Map<String, String> args) { super.init(args); maxShingleSize = getInt("maxShingleSize", ShingleFilter.DEFAULT_MAX_SHINGLE_SIZE); outputUnigrams = getBoolean("outputUnigrams", true); outputUnigramIfNoNgrams = true; /** tbw lets always set it to true above * comment out the original code below getBoolean("outputUnigramIfNoNgram", false); **/ } > Patch to make ShingleFilter.outputUnigramIfNoNgrams (LUCENE-1370) available > in Solr schema files > ------------------------------------------------------------------------------------------------ > > Key: SOLR-744 > URL: https://issues.apache.org/jira/browse/SOLR-744 > Project: Solr > Issue Type: Improvement > Reporter: Chris Harris > Attachments: SOLR-744.patch > > > See LUCENE-1370 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.