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 1DA0D9090 for ; Sun, 22 Apr 2012 09:52:02 +0000 (UTC) Received: (qmail 13734 invoked by uid 500); 22 Apr 2012 09:52:00 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 13680 invoked by uid 500); 22 Apr 2012 09:52:00 -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 13646 invoked by uid 99); 22 Apr 2012 09:51:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Apr 2012 09:51:58 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_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; Sun, 22 Apr 2012 09:51:56 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 4744340865B for ; Sun, 22 Apr 2012 09:51:35 +0000 (UTC) Date: Sun, 22 Apr 2012 09:51:35 +0000 (UTC) From: "Tim Costermans (JIRA)" To: dev@lucene.apache.org Message-ID: <1762585443.2559.1335088295310.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <664641278.2464.1335085194236.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (LUCENE-4009) Implement toString() method in TermsFilter 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/LUCENE-4009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13259063#comment-13259063 ] Tim Costermans commented on LUCENE-4009: ---------------------------------------- Hey Chris, Basically all the subclasses of org.apache.lucene.search.Filter should implement their own toString() method. Maybe this can be enforced by adding this to the Filter class. {code} @Override public abstract String toString(); {code} I was going to investigate this, but this will be something for next week. > Implement toString() method in TermsFilter > ------------------------------------------ > > Key: LUCENE-4009 > URL: https://issues.apache.org/jira/browse/LUCENE-4009 > Project: Lucene - Java > Issue Type: Improvement > Components: modules/other > Affects Versions: 3.5, 3.6 > Reporter: Tim Costermans > Priority: Trivial > Attachments: LUCENE-4009__Improved_previous_implementation_of__toString()_method_in_TermsFilter_+_added.patch, LUCENE-4009__implemented_toString()_method_in_TermsFilter_.patch > > > LUCENE-1049 introduced a enhanced implementation of the toString() method in the BooleanFilter clause. > This was an improvement, however I'm still seeing a lot Lucene filter classes not overriding the toString method resulting in a toString returning the classname and the hashcode of the object. > This can be useful sometimes, but it's totally not useful in my case. > I want to see the properties set in the filters so I know which Lucene query was created. > Now: > BooleanFilter(+BooleanFilter(BooleanFilter(+org.apache.lucene.search.TermsFilter@ea81ba60 +org.apache.lucene.search.TermsFilter@26ea3cbc) BooleanFilter(+org.apache.lucene.search.TermsFilter@df621f09 +org.apache.lucene.search.TermsFilter@2f712446))) > Wanted behavior: > BooleanFilter(+BooleanFilter(BooleanFilter(+inStock:Y +barCode:12345678) BooleanFilter(+isHeavy:N +isDamaged:Y))) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa 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