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 Ranjeet <ra...@ebusinessware.com> on 2008/07/07 11:03:46 UTC

Re: Which parser is used to parse response XML get from Solr

I have downloaded "apache-solr-nightly" include the jar files, and now I 
have to get the response xml value, so for  invoking trhough I did not get 
the common package under solr, so  this class belongs to which jar files? 
pls help me out I am new to Solr1.3. Currently I have configured Solr1.2 in 
defferent system. could you please help me, how to call the Solr server to 
get resposnse xml and want to show the same value on velocity page after 
geting values.



import org.apache.solr.common.SolrException;

import org.apache.solr.common.params.CommonParams;

mport org.apache.solr.common.params.DefaultSolrParams;

import org.apache.solr.common.params.ModifiableSolrParams;

import org.apache.solr.common.params.SolrParams;




String url = "http://192.168.1.2:8983/solr";
SolrServer server = new CommonsHttpSolrServer(url);;
    SolrQuery solrQuery = new  SolrQuery().
                  setQuery("ipod").
                  setFacet(true).
                  setFacetMinCount(1).
                  setFacetLimit(8).
                  addFacetField("category").
                  addFacetField("inStock");
    QueryResponse rsp = server.query(solrQuery);



method query is not exist in server, so

----- Original Message ----- 
From: "Shalin Shekhar Mangar" <sh...@gmail.com>
To: <so...@lucene.apache.org>
Sent: Monday, July 07, 2008 11:29 AM
Subject: Re: Which parser is used to parse response XML efficientl got from 
Solr


> Where did you download Solr from? Are you sure it was the nightly build 
> URL
> that Noble gave?
>
> On Mon, Jul 7, 2008 at 11:13 AM, Ranjeet <ra...@ebusinessware.com>
> wrote:
>
>> HI,
>>
>> I am new to this, I did not find Solr1.3 distribution jar files to use 
>> the
>> "http://wiki.apache.org/solr/Solrj
>> ", although I have downloaded Solr 1.2 but some files are not in Solr1.2 
>> in
>> order to use the XMLResponseParser . Please help me out of this problem 
>> to
>> provide the link of Solr1.3 download or related jar files links.
>>
>>
>> Thanks
>> Ranjeet
>> ----- Original Message ----- From: "Shalin Shekhar Mangar" <
>> shalinmangar@gmail.com>
>> To: <so...@lucene.apache.org>
>> Sent: Sunday, July 06, 2008 7:32 PM
>> Subject: Re: Which parser is used to parse response XML efficientl got 
>> from
>> Solr
>>
>>
>>  Take a look at http://wiki.apache.org/solr/Solrj
>>>
>>> On Sun, Jul 6, 2008 at 7:23 PM, Ranjeet Jha <
>>> ranjeet.jha@ebusinessware.com>
>>> wrote:
>>>
>>>  It would be great if you send the sample code to parse the Solr
>>>> responseXML.
>>>>
>>>> ranjeet
>>>>
>>>>
>>>> On 7/4/08, Noble Paul നോബിള്‍ नोब्ळ् <no...@gmail.com> wrote:
>>>> >
>>>> > apache-solr-solrj-1.3-dev.jar
>>>> > apache-solr-common-1.3-dev.jar
>>>> >
>>>> >
>>>> > On Fri, Jul 4, 2008 at 12:19 PM, Ranjeet > <
>>>> ranjeet.jha@ebusinessware.com>
>>>> > wrote:
>>>> > > which jar file should we include?
>>>> > >
>>>> > > ranjeet
>>>> > > ----- Original Message ----- From: "Noble Paul ??????? ??????"
>>>> > > <no...@gmail.com>
>>>> > > To: <so...@lucene.apache.org>
>>>> > > Sent: Friday, July 04, 2008 11:38 AM
>>>> > > Subject: Re: Which parser is used to parse response XML efficientl 
>>>> > >  >
>>>> > got
>>>> > from
>>>> > > Solr
>>>> > >
>>>> > >
>>>> > >> Solr uses StaX API for parsing xml.
>>>> > >> use
>>>> > >> org.apache.solr.client.solrj.impl.XMLResponseParser
>>>> > >> --Noble
>>>> > >>
>>>> > >> On Fri, Jul 4, 2008 at 11:13 AM, Ranjeet <
>>>> ranjeet.jha@ebusinessware.com
>>>> > >
>>>> > >> wrote:
>>>> > >>>
>>>> > >>> Hi,
>>>> > >>>
>>>> > >>> Which parser is used to parse Response XML got from Solr search
>>>> server.
>>>> > >>> can you pass sample code if you have.
>>>> > >>>
>>>> > >>> Thanks & Regards,
>>>> > >>> Ranjeet
>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>> Thanks & Regards,
>>>>
>>>> Ranjeet Kumar Jha
>>>> +91 9811006657
>>>>
>>>>
>>>
>>>
>>> --
>>> Regards,
>>> Shalin Shekhar Mangar.
>>>
>>>
>>
>
>
> -- 
> Regards,
> Shalin Shekhar Mangar.
> 


Re: Which parser is used to parse response XML get from Solr

Posted by Noble Paul നോബിള്‍ नोब्ळ् <no...@gmail.com>.
I'm at a loss here.

http://java.sun.com/j2se/1.3/docs/tooldocs/win32/classpath.html

This may help you learn how to set classpath in java. The problem you
are facing has little to do with SolrJ .
--Noble

On Mon, Jul 7, 2008 at 5:47 PM, Ranjeet <ra...@ebusinessware.com> wrote:
> Hi,
>
> I have gone through the follwing link but  could not find the any section of
> setting classpath for SolrJ. Pls help me how to come out this problem.
>
> Thanks
> Ranjeet
> ----- Original Message ----- From: "Noble Paul നോബിള്‍ नोब्ळ्"
> <no...@gmail.com>
> To: <so...@lucene.apache.org>
> Sent: Monday, July 07, 2008 3:29 PM
> Subject: Re: Which parser is used to parse response XML get from Solr
>
>
>> hi,
>> I have added a section of classpath setting for SolrJ
>>
>> http://wiki.apache.org/solr/Solrj#head-674dd7743df665fdd56e8eccddce16fc2de20e6e
>> --Noble
>>
>> On Mon, Jul 7, 2008 at 2:33 PM, Ranjeet <ra...@ebusinessware.com>
>> wrote:
>>>
>>> I have downloaded "apache-solr-nightly" include the jar files, and now I
>>> have to get the response xml value, so for  invoking trhough I did not
>>> get
>>> the common package under solr, so  this class belongs to which jar files?
>>> pls help me out I am new to Solr1.3. Currently I have configured Solr1.2
>>> in
>>> defferent system. could you please help me, how to call the Solr server
>>> to
>>> get resposnse xml and want to show the same value on velocity page after
>>> geting values.
>>>
>>>
>>>
>>> import org.apache.solr.common.SolrException;
>>>
>>> import org.apache.solr.common.params.CommonParams;
>>>
>>> mport org.apache.solr.common.params.DefaultSolrParams;
>>>
>>> import org.apache.solr.common.params.ModifiableSolrParams;
>>>
>>> import org.apache.solr.common.params.SolrParams;
>>>
>>>
>>>
>>>
>>> String url = "http://192.168.1.2:8983/solr";
>>> SolrServer server = new CommonsHttpSolrServer(url);;
>>>  SolrQuery solrQuery = new  SolrQuery().
>>>                setQuery("ipod").
>>>                setFacet(true).
>>>                setFacetMinCount(1).
>>>                setFacetLimit(8).
>>>                addFacetField("category").
>>>                addFacetField("inStock");
>>>  QueryResponse rsp = server.query(solrQuery);
>>>
>>>
>>>
>>> method query is not exist in server, so
>>>
>>> ----- Original Message ----- From: "Shalin Shekhar Mangar"
>>> <sh...@gmail.com>
>>> To: <so...@lucene.apache.org>
>>> Sent: Monday, July 07, 2008 11:29 AM
>>> Subject: Re: Which parser is used to parse response XML efficientl got
>>> from
>>> Solr
>>>
>>>
>>>> Where did you download Solr from? Are you sure it was the nightly build
>>>> URL
>>>> that Noble gave?
>>>>
>>>> On Mon, Jul 7, 2008 at 11:13 AM, Ranjeet <ra...@ebusinessware.com>
>>>> wrote:
>>>>
>>>>> HI,
>>>>>
>>>>> I am new to this, I did not find Solr1.3 distribution jar files to use
>>>>> the
>>>>> "http://wiki.apache.org/solr/Solrj
>>>>> ", although I have downloaded Solr 1.2 but some files are not in
>>>>> Solr1.2
>>>>> in
>>>>> order to use the XMLResponseParser . Please help me out of this problem
>>>>> to
>>>>> provide the link of Solr1.3 download or related jar files links.
>>>>>
>>>>>
>>>>> Thanks
>>>>> Ranjeet
>>>>> ----- Original Message ----- From: "Shalin Shekhar Mangar" <
>>>>> shalinmangar@gmail.com>
>>>>> To: <so...@lucene.apache.org>
>>>>> Sent: Sunday, July 06, 2008 7:32 PM
>>>>> Subject: Re: Which parser is used to parse response XML efficientl got
>>>>> from
>>>>> Solr
>>>>>
>>>>>
>>>>>  Take a look at http://wiki.apache.org/solr/Solrj
>>>>>>
>>>>>> On Sun, Jul 6, 2008 at 7:23 PM, Ranjeet Jha <
>>>>>> ranjeet.jha@ebusinessware.com>
>>>>>> wrote:
>>>>>>
>>>>>>  It would be great if you send the sample code to parse the Solr
>>>>>>>
>>>>>>> responseXML.
>>>>>>>
>>>>>>> ranjeet
>>>>>>>
>>>>>>>
>>>>>>> On 7/4/08, Noble Paul നോബിള്‍ नोब्ळ् <no...@gmail.com> wrote:
>>>>>>> >
>>>>>>> > apache-solr-solrj-1.3-dev.jar
>>>>>>> > apache-solr-common-1.3-dev.jar
>>>>>>> >
>>>>>>> >
>>>>>>> > On Fri, Jul 4, 2008 at 12:19 PM, Ranjeet > <
>>>>>>> ranjeet.jha@ebusinessware.com>
>>>>>>> > wrote:
>>>>>>> > > which jar file should we include?
>>>>>>> > >
>>>>>>> > > ranjeet
>>>>>>> > > ----- Original Message ----- From: "Noble Paul ??????? ??????"
>>>>>>> > > <no...@gmail.com>
>>>>>>> > > To: <so...@lucene.apache.org>
>>>>>>> > > Sent: Friday, July 04, 2008 11:38 AM
>>>>>>> > > Subject: Re: Which parser is used to parse response XML > >
>>>>>>> > > efficientl
>>>>>>> > > > >  >
>>>>>>> > got
>>>>>>> > from
>>>>>>> > > Solr
>>>>>>> > >
>>>>>>> > >
>>>>>>> > >> Solr uses StaX API for parsing xml.
>>>>>>> > >> use
>>>>>>> > >> org.apache.solr.client.solrj.impl.XMLResponseParser
>>>>>>> > >> --Noble
>>>>>>> > >>
>>>>>>> > >> On Fri, Jul 4, 2008 at 11:13 AM, Ranjeet <
>>>>>>> ranjeet.jha@ebusinessware.com
>>>>>>> > >
>>>>>>> > >> wrote:
>>>>>>> > >>>
>>>>>>> > >>> Hi,
>>>>>>> > >>>
>>>>>>> > >>> Which parser is used to parse Response XML got from Solr search
>>>>>>> server.
>>>>>>> > >>> can you pass sample code if you have.
>>>>>>> > >>>
>>>>>>> > >>> Thanks & Regards,
>>>>>>> > >>> Ranjeet
>>>>>>> >
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Thanks & Regards,
>>>>>>>
>>>>>>> Ranjeet Kumar Jha
>>>>>>> +91 9811006657
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Regards,
>>>>>> Shalin Shekhar Mangar.
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Regards,
>>>> Shalin Shekhar Mangar.
>>>>
>>>
>>>
>>
>>
>>
>> --
>> --Noble Paul
>>
>
>



-- 
--Noble Paul

Re: Which parser is used to parse response XML get from Solr

Posted by Ranjeet <ra...@ebusinessware.com>.
Hi,

I have gone through the follwing link but  could not find the any section of 
setting classpath for SolrJ. Pls help me how to come out this problem.

Thanks
Ranjeet
----- Original Message ----- 
From: "Noble Paul നോബിള്‍ नोब्ळ्" <no...@gmail.com>
To: <so...@lucene.apache.org>
Sent: Monday, July 07, 2008 3:29 PM
Subject: Re: Which parser is used to parse response XML get from Solr


> hi,
> I have added a section of classpath setting for SolrJ
> http://wiki.apache.org/solr/Solrj#head-674dd7743df665fdd56e8eccddce16fc2de20e6e
> --Noble
>
> On Mon, Jul 7, 2008 at 2:33 PM, Ranjeet <ra...@ebusinessware.com> 
> wrote:
>> I have downloaded "apache-solr-nightly" include the jar files, and now I
>> have to get the response xml value, so for  invoking trhough I did not 
>> get
>> the common package under solr, so  this class belongs to which jar files?
>> pls help me out I am new to Solr1.3. Currently I have configured Solr1.2 
>> in
>> defferent system. could you please help me, how to call the Solr server 
>> to
>> get resposnse xml and want to show the same value on velocity page after
>> geting values.
>>
>>
>>
>> import org.apache.solr.common.SolrException;
>>
>> import org.apache.solr.common.params.CommonParams;
>>
>> mport org.apache.solr.common.params.DefaultSolrParams;
>>
>> import org.apache.solr.common.params.ModifiableSolrParams;
>>
>> import org.apache.solr.common.params.SolrParams;
>>
>>
>>
>>
>> String url = "http://192.168.1.2:8983/solr";
>> SolrServer server = new CommonsHttpSolrServer(url);;
>>   SolrQuery solrQuery = new  SolrQuery().
>>                 setQuery("ipod").
>>                 setFacet(true).
>>                 setFacetMinCount(1).
>>                 setFacetLimit(8).
>>                 addFacetField("category").
>>                 addFacetField("inStock");
>>   QueryResponse rsp = server.query(solrQuery);
>>
>>
>>
>> method query is not exist in server, so
>>
>> ----- Original Message ----- From: "Shalin Shekhar Mangar"
>> <sh...@gmail.com>
>> To: <so...@lucene.apache.org>
>> Sent: Monday, July 07, 2008 11:29 AM
>> Subject: Re: Which parser is used to parse response XML efficientl got 
>> from
>> Solr
>>
>>
>>> Where did you download Solr from? Are you sure it was the nightly build
>>> URL
>>> that Noble gave?
>>>
>>> On Mon, Jul 7, 2008 at 11:13 AM, Ranjeet <ra...@ebusinessware.com>
>>> wrote:
>>>
>>>> HI,
>>>>
>>>> I am new to this, I did not find Solr1.3 distribution jar files to use
>>>> the
>>>> "http://wiki.apache.org/solr/Solrj
>>>> ", although I have downloaded Solr 1.2 but some files are not in 
>>>> Solr1.2
>>>> in
>>>> order to use the XMLResponseParser . Please help me out of this problem
>>>> to
>>>> provide the link of Solr1.3 download or related jar files links.
>>>>
>>>>
>>>> Thanks
>>>> Ranjeet
>>>> ----- Original Message ----- From: "Shalin Shekhar Mangar" <
>>>> shalinmangar@gmail.com>
>>>> To: <so...@lucene.apache.org>
>>>> Sent: Sunday, July 06, 2008 7:32 PM
>>>> Subject: Re: Which parser is used to parse response XML efficientl got
>>>> from
>>>> Solr
>>>>
>>>>
>>>>  Take a look at http://wiki.apache.org/solr/Solrj
>>>>>
>>>>> On Sun, Jul 6, 2008 at 7:23 PM, Ranjeet Jha <
>>>>> ranjeet.jha@ebusinessware.com>
>>>>> wrote:
>>>>>
>>>>>  It would be great if you send the sample code to parse the Solr
>>>>>>
>>>>>> responseXML.
>>>>>>
>>>>>> ranjeet
>>>>>>
>>>>>>
>>>>>> On 7/4/08, Noble Paul നോബിള്‍ नोब्ळ् <no...@gmail.com> wrote:
>>>>>> >
>>>>>> > apache-solr-solrj-1.3-dev.jar
>>>>>> > apache-solr-common-1.3-dev.jar
>>>>>> >
>>>>>> >
>>>>>> > On Fri, Jul 4, 2008 at 12:19 PM, Ranjeet > <
>>>>>> ranjeet.jha@ebusinessware.com>
>>>>>> > wrote:
>>>>>> > > which jar file should we include?
>>>>>> > >
>>>>>> > > ranjeet
>>>>>> > > ----- Original Message ----- From: "Noble Paul ??????? ??????"
>>>>>> > > <no...@gmail.com>
>>>>>> > > To: <so...@lucene.apache.org>
>>>>>> > > Sent: Friday, July 04, 2008 11:38 AM
>>>>>> > > Subject: Re: Which parser is used to parse response XML 
>>>>>> > > efficientl
>>>>>> > > > >  >
>>>>>> > got
>>>>>> > from
>>>>>> > > Solr
>>>>>> > >
>>>>>> > >
>>>>>> > >> Solr uses StaX API for parsing xml.
>>>>>> > >> use
>>>>>> > >> org.apache.solr.client.solrj.impl.XMLResponseParser
>>>>>> > >> --Noble
>>>>>> > >>
>>>>>> > >> On Fri, Jul 4, 2008 at 11:13 AM, Ranjeet <
>>>>>> ranjeet.jha@ebusinessware.com
>>>>>> > >
>>>>>> > >> wrote:
>>>>>> > >>>
>>>>>> > >>> Hi,
>>>>>> > >>>
>>>>>> > >>> Which parser is used to parse Response XML got from Solr search
>>>>>> server.
>>>>>> > >>> can you pass sample code if you have.
>>>>>> > >>>
>>>>>> > >>> Thanks & Regards,
>>>>>> > >>> Ranjeet
>>>>>> >
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Thanks & Regards,
>>>>>>
>>>>>> Ranjeet Kumar Jha
>>>>>> +91 9811006657
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Shalin Shekhar Mangar.
>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>> Regards,
>>> Shalin Shekhar Mangar.
>>>
>>
>>
>
>
>
> -- 
> --Noble Paul
> 


Re: Which parser is used to parse response XML get from Solr

Posted by Noble Paul നോബിള്‍ नोब्ळ् <no...@gmail.com>.
hi,
I have added a section of classpath setting for SolrJ
http://wiki.apache.org/solr/Solrj#head-674dd7743df665fdd56e8eccddce16fc2de20e6e
--Noble

On Mon, Jul 7, 2008 at 2:33 PM, Ranjeet <ra...@ebusinessware.com> wrote:
> I have downloaded "apache-solr-nightly" include the jar files, and now I
> have to get the response xml value, so for  invoking trhough I did not get
> the common package under solr, so  this class belongs to which jar files?
> pls help me out I am new to Solr1.3. Currently I have configured Solr1.2 in
> defferent system. could you please help me, how to call the Solr server to
> get resposnse xml and want to show the same value on velocity page after
> geting values.
>
>
>
> import org.apache.solr.common.SolrException;
>
> import org.apache.solr.common.params.CommonParams;
>
> mport org.apache.solr.common.params.DefaultSolrParams;
>
> import org.apache.solr.common.params.ModifiableSolrParams;
>
> import org.apache.solr.common.params.SolrParams;
>
>
>
>
> String url = "http://192.168.1.2:8983/solr";
> SolrServer server = new CommonsHttpSolrServer(url);;
>   SolrQuery solrQuery = new  SolrQuery().
>                 setQuery("ipod").
>                 setFacet(true).
>                 setFacetMinCount(1).
>                 setFacetLimit(8).
>                 addFacetField("category").
>                 addFacetField("inStock");
>   QueryResponse rsp = server.query(solrQuery);
>
>
>
> method query is not exist in server, so
>
> ----- Original Message ----- From: "Shalin Shekhar Mangar"
> <sh...@gmail.com>
> To: <so...@lucene.apache.org>
> Sent: Monday, July 07, 2008 11:29 AM
> Subject: Re: Which parser is used to parse response XML efficientl got from
> Solr
>
>
>> Where did you download Solr from? Are you sure it was the nightly build
>> URL
>> that Noble gave?
>>
>> On Mon, Jul 7, 2008 at 11:13 AM, Ranjeet <ra...@ebusinessware.com>
>> wrote:
>>
>>> HI,
>>>
>>> I am new to this, I did not find Solr1.3 distribution jar files to use
>>> the
>>> "http://wiki.apache.org/solr/Solrj
>>> ", although I have downloaded Solr 1.2 but some files are not in Solr1.2
>>> in
>>> order to use the XMLResponseParser . Please help me out of this problem
>>> to
>>> provide the link of Solr1.3 download or related jar files links.
>>>
>>>
>>> Thanks
>>> Ranjeet
>>> ----- Original Message ----- From: "Shalin Shekhar Mangar" <
>>> shalinmangar@gmail.com>
>>> To: <so...@lucene.apache.org>
>>> Sent: Sunday, July 06, 2008 7:32 PM
>>> Subject: Re: Which parser is used to parse response XML efficientl got
>>> from
>>> Solr
>>>
>>>
>>>  Take a look at http://wiki.apache.org/solr/Solrj
>>>>
>>>> On Sun, Jul 6, 2008 at 7:23 PM, Ranjeet Jha <
>>>> ranjeet.jha@ebusinessware.com>
>>>> wrote:
>>>>
>>>>  It would be great if you send the sample code to parse the Solr
>>>>>
>>>>> responseXML.
>>>>>
>>>>> ranjeet
>>>>>
>>>>>
>>>>> On 7/4/08, Noble Paul നോബിള്‍ नोब्ळ् <no...@gmail.com> wrote:
>>>>> >
>>>>> > apache-solr-solrj-1.3-dev.jar
>>>>> > apache-solr-common-1.3-dev.jar
>>>>> >
>>>>> >
>>>>> > On Fri, Jul 4, 2008 at 12:19 PM, Ranjeet > <
>>>>> ranjeet.jha@ebusinessware.com>
>>>>> > wrote:
>>>>> > > which jar file should we include?
>>>>> > >
>>>>> > > ranjeet
>>>>> > > ----- Original Message ----- From: "Noble Paul ??????? ??????"
>>>>> > > <no...@gmail.com>
>>>>> > > To: <so...@lucene.apache.org>
>>>>> > > Sent: Friday, July 04, 2008 11:38 AM
>>>>> > > Subject: Re: Which parser is used to parse response XML efficientl
>>>>> > > > >  >
>>>>> > got
>>>>> > from
>>>>> > > Solr
>>>>> > >
>>>>> > >
>>>>> > >> Solr uses StaX API for parsing xml.
>>>>> > >> use
>>>>> > >> org.apache.solr.client.solrj.impl.XMLResponseParser
>>>>> > >> --Noble
>>>>> > >>
>>>>> > >> On Fri, Jul 4, 2008 at 11:13 AM, Ranjeet <
>>>>> ranjeet.jha@ebusinessware.com
>>>>> > >
>>>>> > >> wrote:
>>>>> > >>>
>>>>> > >>> Hi,
>>>>> > >>>
>>>>> > >>> Which parser is used to parse Response XML got from Solr search
>>>>> server.
>>>>> > >>> can you pass sample code if you have.
>>>>> > >>>
>>>>> > >>> Thanks & Regards,
>>>>> > >>> Ranjeet
>>>>> >
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Thanks & Regards,
>>>>>
>>>>> Ranjeet Kumar Jha
>>>>> +91 9811006657
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Regards,
>>>> Shalin Shekhar Mangar.
>>>>
>>>>
>>>
>>
>>
>> --
>> Regards,
>> Shalin Shekhar Mangar.
>>
>
>



-- 
--Noble Paul