if you go the MultiFieldQueryParser route you are going to need some
arrays. You specifically asked if you needed an array of
BooleanClause.Occur and the answer to that specific question is still
no.

I can't tell you any more on this than you can get from reading the javadocs.


--
Ian.



On Thu, Mar 17, 2011 at 1:45 PM, shrinath.m <[email protected]> wrote:
> On Thu, Mar 17, 2011 at 7:07 PM, Ian Lea [via Lucene] <
> [email protected]> wrote:
>
>> static Query parse(Version matchVersion, String[] queries, String[]
>> fields, Analyzer analyzer)
>>           Parses a query which searches on the fields specified.
>>
>
>
> Well, at the end of the day its either I make an array of Boolean.Occur
> or I make an array of Queries to go with the fields right ?
> Nothing helps me from creating an unnecessary array of repetitive elements ?
> :(
>
> So if I have 2 fields "name" and "address",
> and if the query is "shrinath",
>
> then there should be arrays like this :
>    private static String[] fields = {"name", "address"};
>    private static BooleanClause.Occur[] flags= {BooleanClause.Occur.SHOULD,
> BooleanClause.Occur.SHOULD};
> and the parse method should go like this :
> MultiFieldQueryParser.parse(Version.LUCENE_CURRENT, s, fields, flags, new
> StandardAnalyzer(Version.LUCENE_CURRENT, Collections.emptySet()));
>
> :(
> --
> Regards
> Shrinath.M
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/How-to-do-an-all-field-search-without-using-a-catchall-field-or-MultiFieldQueryParser-tp2681163p2693475.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to