You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Kevin Lewandowski <ke...@gmail.com> on 2006/09/27 05:02:06 UTC

Can't get q.op working

I'm running the latest nightly build (2006-09-27) and cannot seem to
get the q.op parameter working. I have the default operator set to AND
and am testing with a two word query that returns no results. If I add
"OR" to the query I get results. But if I remove the OR and add
"q.op=OR" to the Solr query I still get no results.

Is there anything I could be doing wrong?

thanks
Kevin

Re: Can't get q.op working

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Sep 27, 2006, at 12:06 PM, Kevin Lewandowski wrote:

> Now I feel dumb! I hadn't deployed the latest build properly. The new
> .war file was there but for some reason restarting tomcat didn't
> reload it. Anyway, q.op is working fine now.

hey, no worries... it happens to all of us.  i'm just glad that was  
the solution and not a solr bug ;)


>
> On 9/27/06, Erik Hatcher <er...@ehatchersolutions.com> wrote:
>> Kevin,
>>
>> I've just tried this locally using the tutorial example data, using
>> both a default (in schema.xml) of AND and OR.  (I use the Ruby
>> response writer because it's easier to read than XML ;)
>>
>> Use the default operator from schema.xml:
>>         <http://localhost:8983/solr/select?wt=ruby&indent=2&q=ipod% 
>> 20belkin>
>>
>> Override with AND:
>>         <http://localhost:8983/solr/select?wt=ruby&indent=2&q=ipod%
>> 20belkin&q.op=AND>
>>
>> Override with OR:
>>         <http://localhost:8983/solr/select?wt=ruby&indent=2&q=ipod%
>> 20belkin&q.op=OR>
>>
>> All worked as expected in all cases.  There is one result with AND
>> and three results with OR.
>>
>> I recommend you try this same scenario out with the tutorial example
>> data and ensure things work as I've stated here.  Let us know more
>> details if the problem persists.
>>
>>         Erik
>>
>>
>> On Sep 26, 2006, at 11:02 PM, Kevin Lewandowski wrote:
>>
>> > I'm running the latest nightly build (2006-09-27) and cannot  
>> seem to
>> > get the q.op parameter working. I have the default operator set  
>> to AND
>> > and am testing with a two word query that returns no results. If  
>> I add
>> > "OR" to the query I get results. But if I remove the OR and add
>> > "q.op=OR" to the Solr query I still get no results.
>> >
>> > Is there anything I could be doing wrong?
>> >
>> > thanks
>> > Kevin
>>
>>


Re: Can't get q.op working

Posted by Kevin Lewandowski <ke...@gmail.com>.
Now I feel dumb! I hadn't deployed the latest build properly. The new
.war file was there but for some reason restarting tomcat didn't
reload it. Anyway, q.op is working fine now.

On 9/27/06, Erik Hatcher <er...@ehatchersolutions.com> wrote:
> Kevin,
>
> I've just tried this locally using the tutorial example data, using
> both a default (in schema.xml) of AND and OR.  (I use the Ruby
> response writer because it's easier to read than XML ;)
>
> Use the default operator from schema.xml:
>         <http://localhost:8983/solr/select?wt=ruby&indent=2&q=ipod%20belkin>
>
> Override with AND:
>         <http://localhost:8983/solr/select?wt=ruby&indent=2&q=ipod%
> 20belkin&q.op=AND>
>
> Override with OR:
>         <http://localhost:8983/solr/select?wt=ruby&indent=2&q=ipod%
> 20belkin&q.op=OR>
>
> All worked as expected in all cases.  There is one result with AND
> and three results with OR.
>
> I recommend you try this same scenario out with the tutorial example
> data and ensure things work as I've stated here.  Let us know more
> details if the problem persists.
>
>         Erik
>
>
> On Sep 26, 2006, at 11:02 PM, Kevin Lewandowski wrote:
>
> > I'm running the latest nightly build (2006-09-27) and cannot seem to
> > get the q.op parameter working. I have the default operator set to AND
> > and am testing with a two word query that returns no results. If I add
> > "OR" to the query I get results. But if I remove the OR and add
> > "q.op=OR" to the Solr query I still get no results.
> >
> > Is there anything I could be doing wrong?
> >
> > thanks
> > Kevin
>
>

Re: Can't get q.op working

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Kevin,

I've just tried this locally using the tutorial example data, using  
both a default (in schema.xml) of AND and OR.  (I use the Ruby  
response writer because it's easier to read than XML ;)

Use the default operator from schema.xml:
	<http://localhost:8983/solr/select?wt=ruby&indent=2&q=ipod%20belkin>

Override with AND:
	<http://localhost:8983/solr/select?wt=ruby&indent=2&q=ipod% 
20belkin&q.op=AND>

Override with OR:
	<http://localhost:8983/solr/select?wt=ruby&indent=2&q=ipod% 
20belkin&q.op=OR>

All worked as expected in all cases.  There is one result with AND  
and three results with OR.

I recommend you try this same scenario out with the tutorial example  
data and ensure things work as I've stated here.  Let us know more  
details if the problem persists.

	Erik


On Sep 26, 2006, at 11:02 PM, Kevin Lewandowski wrote:

> I'm running the latest nightly build (2006-09-27) and cannot seem to
> get the q.op parameter working. I have the default operator set to AND
> and am testing with a two word query that returns no results. If I add
> "OR" to the query I get results. But if I remove the OR and add
> "q.op=OR" to the Solr query I still get no results.
>
> Is there anything I could be doing wrong?
>
> thanks
> Kevin