Right, and I'm not wanting to display the query as a string, I'm building a
more complicated graphical UI off of the query structure.  The approach I'm
going with right now is to build a structure off of the Query object graph
that contains everything I need in an easier-to-consume object graph.  It
will work, I just wanted to be sure I wasn't overlooking something obvious.

On Wed, Mar 10, 2010 at 11:13 AM, Michael Garski <[email protected]>wrote:

> Calling ToString() on the query will display the string representation of
> the query for a user, but Mike is right, not all query types can go round
> trip from a string to a query through the QueryParser - SpanQuery,
> CustomScoreQuery, and PayloadQuery fall into this category.
>
>
> Michael
>
> -----Original Message-----
> From: Mike Schenk [mailto:[email protected]]
> Sent: Wednesday, March 10, 2010 8:23 AM
> To: [email protected]
> Subject: RE: Working with Query classes
>
> I'm no power user, but I hunted for something similar and ended up
> switching off the concrete type like you mentioned. It's not even clear
> to me which concrete Query types can be produced by the QueryParser, but
> I don't believe all of them can. In particular, I don't believe the
> SpanQuery types can.
>
>
>
>
>  ================================
>  Mike Schenk
>  Senior Software Architect
>  [email protected]
>  801-858-3800 - main
>  801-858-3821 - direct
>  801-858-3838 - fax
>  ================================
>
> -----Original Message-----
> From: Matt Honeycutt [mailto:[email protected]]
> Sent: Wednesday, March 10, 2010 6:59 AM
> To: [email protected]
> Subject: Working with Query classes
>
> Is there a "good" way to work with Query and its concrete
> implementations?
> I'd like to display a graphical representation of the user's query.
> We're
> parsing the user's input using the standard QueryParser class.  What I'd
> like to do is extract all the criteria from the query and display them,
> but
> I don't see anything in the abstract Query class that is suitable for
> this.
> Is my only option to switch off the concrete type and treat each one
> differently, or am I overlooking some simpler solution?
>
>

Reply via email to