Mailing List Archive

Printing queries
When I used toString() on a Query object, I don't get a textual
representation of the query. Instead I get something like:
org.apache.lucene.search.BooleanQuery@29
org.apache.lucene.search.BooleanQuery@14d
Any ideas what I can do to fix this? BTW, this is with Visual J++.

-- David Elworthy

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
RE: Printing queries [ In reply to ]
The method that is defined is:
public void toString(String defaultField);

Probably a method like the following should be added:
public void toString() { toString(""); }

Doug

> -----Original Message-----
> From: David Elworthy [mailto:dahe@lingomotors.com]
> Sent: Tuesday, February 19, 2002 2:39 PM
> To: lucene-user@jakarta.apache.org
> Subject: Printing queries
>
>
> When I used toString() on a Query object, I don't get a textual
> representation of the query. Instead I get something like:
> org.apache.lucene.search.BooleanQuery@29
> org.apache.lucene.search.BooleanQuery@14d
> Any ideas what I can do to fix this? BTW, this is with Visual J++.
>
> -- David Elworthy
>
> --
> To unsubscribe, e-mail:
> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:lucene-user-help@jakarta.apache.org>
>

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Printing queries [ In reply to ]
David Elworthy wrote:
>
> When I used toString() on a Query object, I don't get a textual
> representation of the query. Instead I get something like:
> org.apache.lucene.search.BooleanQuery@29
> org.apache.lucene.search.BooleanQuery@14d
> Any ideas what I can do to fix this? BTW, this is with Visual J++.
>
> -- David Elworthy
>

Use Query#toString(String defaultField) instead.

--
Nick Smith

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>