Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2DFEC17DD1 for ; Thu, 15 Jan 2015 23:37:34 +0000 (UTC) Received: (qmail 94241 invoked by uid 500); 15 Jan 2015 23:37:35 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 94171 invoked by uid 500); 15 Jan 2015 23:37:35 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 94158 invoked by uid 99); 15 Jan 2015 23:37:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jan 2015 23:37:35 +0000 Date: Thu, 15 Jan 2015 23:37:35 +0000 (UTC) From: "Boon Low (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (SOLR-6648) AnalyzingInfixLookupFactory always highlights suggestions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SOLR-6648?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D14261= 237#comment-14261237 ]=20 Boon Low edited comment on SOLR-6648 at 1/15/15 11:37 PM: ---------------------------------------------------------- I have created a patche for this, in Lucene and Solr, so that highlighting = and the Boolean matching clause can be configured in solrconfig.xml, for *B= lendedInfixSuggester* and *AnalyzingInfixSuggester*: {code:xml} .. BlendedInfixLookupFactory DocumentDictionaryFactory ... false true {code} If not configured, both 'highlighting' and 'allTermsRequired' default to *t= rue. was (Author: boonious): I have created a patche for this, in Lucene and Solr, so that highlighting = and the Boolean matching clause can be configured in solrconfig.xml, for *B= lendedInfixSuggester* and *AnalyzingInfixSuggester*: {code:xml} .. BlendedInfixLookupFactory DocumentDictionaryFactory ... false true {code} If not configured, both 'highlighting' and 'allTermsRequired' default to *t= rue. > AnalyzingInfixLookupFactory always highlights suggestions > --------------------------------------------------------- > > Key: SOLR-6648 > URL: https://issues.apache.org/jira/browse/SOLR-6648 > Project: Solr > Issue Type: Sub-task > Affects Versions: 4.9, 4.9.1, 4.10, 4.10.1 > Reporter: Varun Thacker > Assignee: Tom=C3=A1s Fern=C3=A1ndez L=C3=B6bbe > Labels: suggester > Fix For: 5.0, Trunk > > Attachments: SOLR-6648-v4.10.3.patch, SOLR-6648.patch > > > When using AnalyzingInfixLookupFactory suggestions always return with the= match term as highlighted and 'allTermsRequired' is always set to true. > We should be able to configure those. > Steps to reproduce -=20 > schema additions > {code} > > > mySuggester > AnalyzingInfixLookupFactory > DocumentDictionaryFactory=20 > suggestField > weight > textSuggest > > > > > true > 10 > > > suggest > > > {code} > solrconfig changes - > {code} > > > > > > > > > {code} > Add 3 documents -=20 > {code} > curl http://localhost:8983/solr/update/json?commit=3Dtrue -H 'Content-typ= e:application/json' -d ' > [ {"id" : "1", "suggestField" : "bass fishing"}, {"id" : "2", "suggestFie= ld" : "sea bass"}, {"id" : "3", "suggestField" : "sea bass fishing"} ] > ' > {code} > Query - > {code} > http://localhost:8983/solr/collection1/suggest?suggest.build=3Dtrue&sugge= st.dictionary=3DmySuggester&q=3Dbass&wt=3Djson&indent=3Don > {code} > Response=20 > {code} > { > "responseHeader":{ > "status":0, > "QTime":25}, > "command":"build", > "suggest":{"mySuggester":{ > "bass":{ > "numFound":3, > "suggestions":[{ > "term":"bass fishing", > "weight":0, > "payload":""}, > { > "term":"sea bass", > "weight":0, > "payload":""}, > { > "term":"sea bass fishing", > "weight":0, > "payload":""}]}}}} > {code} > The problem is in SolrSuggester Line 200 where we say lookup.lookup() > This constructor does not take allTermsRequired and doHighlight since it'= s only tuneable to AnalyzingInfixSuggester and not the other lookup impleme= ntations. > If different Lookup implementations have different params as their constr= uctors, these sort of issues will always keep happening. Maybe we should no= t keep it generic and do instanceof checks and set params accordingly? -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org