Re: DismaxParser Query

2011-01-27 Thread Bijeet Singh
The DisMax query parser internally hard-codes its operator to OR.
This is quite unlike the Lucene query parser, for which the default operator
can be configured using the solrQueryParser in schema.xml

Regards,

Bijeet Singh

On Thu, Jan 27, 2011 at 4:56 PM, Isan Fulia wrote:

> but q="keyword1 keyword2"  does AND operation  not OR
>
> On 27 January 2011 16:22, lee carroll 
> wrote:
>
> > use dismax q for first three fields and a filter query for the 4th and
> 5th
> > fields
> > so
> > q="keyword1 keyword 2"
> > qf = field1,feild2,field3
> > pf = field1,feild2,field3
> > mm=something sensible for you
> > defType=dismax
> > fq=" field4:(keyword3 OR keyword4) AND field5:(keyword5)"
> >
> > take a look at the dismax docs for extra params
> >
> >
> >
> > On 27 January 2011 08:52, Isan Fulia  wrote:
> >
> > > Hi all,
> > > The query for standard request handler is as follows
> > > field1:(keyword1 OR keyword2) OR field2:(keyword1 OR keyword2) OR
> > > field3:(keyword1 OR keyword2) AND field4:(keyword3 OR keyword4) AND
> > > field5:(keyword5)
> > >
> > >
> > > How the same above query can be written for dismax request handler
> > >
> > > --
> > > Thanks & Regards,
> > > Isan Fulia.
> > >
> >
>
>
>
> --
> Thanks & Regards,
> Isan Fulia.
>


Problem instantiating CommonsHttpSolrServer using solrj

2010-08-11 Thread bijeet singh
Hi all,

I'm trying to use solrj for indexing in solr, but when I try to instantiate
the server, using :

SolrServer server = new CommonsHttpSolrServer("http://localhost:8080/solr";);

 I get the following runtime error:

Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/solr/client/solrj/SolrServerException
Caused by: java.lang.ClassNotFoundException:
org.apache.solr.client.solrj.SolrServerException
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)


I am following the this link :  http://wiki.apache.org/solr/Solrj   ,and
have included all the jar files specified there, in the classpath.


Do help me out with this, thanks in advance

Bijeet