You might also consider splitting your two seperate "AND" clauses into two seperate fq's:

&fq=field1:(1 OR 2 OR 3 OR 4)
&fq=field2:(4 OR 5 OR 6 OR 7)

That will cache the two seperate clauses seperately in the field cache, which is probably preferable in general, without knowing more about your use characteristics.

ALSO, instead of either supplying the "OR" explicitly as above, OR changing the default operator in schema.xml for everything, I believe it would work to supply it as a local param:

&fq={q.op=OR}field1:(1 2 3 4)

If you want to do that.

AND, your question, can you search without a 'q'? No, but you can search with a 'q' that selects all documents, to be limited by the fq's.

q=[* TO *]

On 3/3/2011 1:14 PM, Tanner Postert wrote:
That worked, thought I tried it before, not sure why it didn't before.

Also, is there a way to query without a q parameter?

I'm just trying to pull back all of the field results where field1:(1 OR 2
OR 3) etc. so I figured I'd use the FQ param for caching purposes because
those queries will likely be run a lot, but if I leave the Q parameter off i
get a null pointer error.

On Thu, Mar 3, 2011 at 11:05 AM, Ahmet Arslan<iori...@yahoo.com>  wrote:

Trying to figure out how I can run
something similar to this for the fq
parameter

Field1 in ( 1, 2, 3 4 )
AND
Field2 in ( 4, 5, 6, 7 )

I found some examples on the net that looked like this:
&fq=+field1:(1 2 3
4) +field2(4 5 6 7) but that yields no results.
May be your default operator is set to AND in schema.xml?
If yes, try using +field2(4 OR 5 OR 6 OR 7)




Reply via email to