lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andre Rubin" <andre.ru...@gmail.com>
Subject Re: MultiPhrase search
Date Tue, 26 Aug 2008 16:49:26 GMT
Now I was the one who didn't follow: How do I add a query to an existing
query?

Let me be more clear on my use case:

I have two documents:
1)
label:One Two Three
type:sequence

2)
label:One Two FOUR
type:other


I want to be able to make the same kind of search as you described earlier
using PrefixQuery, but I want to filter the results using the other field.
Like:
label:One Tw*
type:sequence

And I only want to get document 1 as result.

At first glance, it seems that your answer may fit, but I'm not sure what
you meant by adding another query to an existing query.

Thanks again,


Andre

On Tue, Aug 26, 2008 at 9:34 AM, Daniel Naber <lucenelist2007@danielnaber.de
> wrote:

> On Dienstag, 26. August 2008, Andre Rubin wrote:
>
> > I just have one more use case. I want the same prefix search as before,
> > plus another match in another field.
>
> Not sure if I'm following you, but you can create your own BooleanQuery
> programmatically, and then add the original PrefixQuery and any other
> query, no matter if it's another BooleanQuery or if comes out of the
> QueryParser or is also built programmatically.
>
> Regards
>  Daniel
>
> --
> http://www.danielnaber.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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