lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: Get fields from a Query object
Date Mon, 02 Aug 2010 15:01:04 GMT
Did you look at Query.extractTerms? I think that'll work for you.
Note that the query must be rewritten, and that the set of terms will
have duplicate fields. i.e. if you search field1:Erick +field1:James
I expect you'll have two terms in the set that are on field1.

Best
Erick

On Mon, Aug 2, 2010 at 8:16 AM, Anuj Shah <anujshahwork@gmail.com> wrote:

> My code has been given a query string, which we parse into the Query object
> and would like to get a list of fields from.
>
> I'm assuming there exists a method to do so, as it seems like a useful
> function. If not should I be parsing the string for fields myself.
>
> Anuj
>
>
>
>
>
> On Sun, Aug 1, 2010 at 2:21 AM, Erick Erickson <erickerickson@gmail.com
> >wrote:
>
> > Could you explain more about what you're trying to do? You're writing the
> > query
> > after all, so you probably already know what went into it.
> >
> > Which shows that I don't understand what you want to do at all.
> >
> > Best
> > Erick
> >
> > On Sat, Jul 31, 2010 at 9:41 AM, Anuj Shah <anujshahwork@gmail.com>
> wrote:
> >
> > > Hi,
> > >
> > > Is there a way to get all the fields involved in a query?
> > >
> > > Thanks
> > >
> > > Anuj
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message