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 06B748E44 for ; Thu, 1 Sep 2011 19:10:35 +0000 (UTC) Received: (qmail 7542 invoked by uid 500); 1 Sep 2011 19:10:33 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 7440 invoked by uid 500); 1 Sep 2011 19:10:33 -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 7431 invoked by uid 99); 1 Sep 2011 19:10:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Sep 2011 19:10:32 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Sep 2011 19:10:30 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 6688F4E4D7 for ; Thu, 1 Sep 2011 19:10:10 +0000 (UTC) Date: Thu, 1 Sep 2011 19:10:10 +0000 (UTC) From: "James Dyer (JIRA)" To: dev@lucene.apache.org Message-ID: <1589322149.8021.1314904210416.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1034141648.12355.1307742300199.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (SOLR-2585) Context-Sensitive Spelling Suggestions & Collations MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SOLR-2585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13095540#comment-13095540 ] James Dyer commented on SOLR-2585: ---------------------------------- As a clarification, the necessary change I mention to DirectSpellChecker is included in this patch (this question came up recently on the user-list). This change allows us to offer any term within the specified maximum edit distance as a Suggestion, regardless of the original term's frequency in the index. > Context-Sensitive Spelling Suggestions & Collations > --------------------------------------------------- > > Key: SOLR-2585 > URL: https://issues.apache.org/jira/browse/SOLR-2585 > Project: Solr > Issue Type: Improvement > Components: spellchecker > Affects Versions: 4.0 > Reporter: James Dyer > Priority: Minor > Attachments: SOLR-2585.patch, SOLR-2585.patch > > > Solr currently cannot offer what I'm calling here a "context-sensitive" spelling suggestion. That is, if a user enters one or more words that have docFrequency > 0, but nevertheless are misspelled, then no suggestions are offered. Currently, Solr will always consider a word "correctly spelled" if it is in the index and/or dictionary, regardless of context. This issue & patch add support for context-sensitive spelling suggestions. > See SpellCheckCollatorTest.testContextSensitiveCollate() for a the typical use case for this functionality. This tests both using IndexBasedSepllChecker and DirectSolrSpellChecker. > Two new Spelling Parameters were added: > - spellcheck.alternativeTermCount - The count of suggestions to return for each query term existing in the index and/or dictionary. Presumably, users will want fewer suggestions for words with docFrequency>0. Also setting this value turns "on" context-sensitive spell suggestions. > - spellcheck.maxResultsForSuggest - The maximum number of hits the request can return in order to both generate spelling suggestions and set the "correctlySpelled" element to "false". For example, if this is set to 5 and the user's query returns 5 or fewer results, the spellchecker will report "correctlySpelled=false" and also offer suggestions (and collations if requested). Setting this greater than zero is useful for creating "did-you-mean" suggestions for queries that return a low number of hits. > I have also included a test using shards. See additions to DistributedSpellCheckComponentTest. > In Lucene, SpellChecker.java can already support this functionality (by passing a null IndexReader and field-name). The DirectSpellChecker, however, needs a minor enhancement. This gives the option to allow DirectSpellChecker to return suggestions for all query terms regardless of frequency. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org