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 hassancrowdc <ha...@gmail.com> on 2013/01/23 20:54:07 UTC

ResultSet Solr

Is there anyway i can get rid of the response header(response header, status,
Qtime,response, numFound, start, docs) from the resultset of the query in
solr. I only want to see the result without this info at the top.



--
View this message in context: http://lucene.472066.n3.nabble.com/ResultSet-Solr-tp4035729.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: ResultSet Solr

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
http://wiki.apache.org/solr/XsltResponseWriter

IIRC you can output even json by xslt.


On Thu, Jan 24, 2013 at 5:11 AM, Otis Gospodnetic <
otis.gospodnetic@gmail.com> wrote:

> Hi,
>
> Write a custom response writer?
>
> Otis
> Solr & ElasticSearch Support
> http://sematext.com/
> On Jan 23, 2013 3:51 PM, "hassancrowdc" <ha...@gmail.com> wrote:
>
> > no I wanted it in json. i want it to start from where square bracket
> > starts [
> > . I want to remove everything before that. I can get it in json by
> > including
> > wt=json. I just want to remove Response, numFound, start and docs.
> >
> >
> >
> > --
> > View this message in context:
> > http://lucene.472066.n3.nabble.com/ResultSet-Solr-tp4035729p4035748.html
> > Sent from the Solr - User mailing list archive at Nabble.com.
> >
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
 <mk...@griddynamics.com>

Re: ResultSet Solr

Posted by Otis Gospodnetic <ot...@gmail.com>.
Hi,

Write a custom response writer?

Otis
Solr & ElasticSearch Support
http://sematext.com/
On Jan 23, 2013 3:51 PM, "hassancrowdc" <ha...@gmail.com> wrote:

> no I wanted it in json. i want it to start from where square bracket
> starts [
> . I want to remove everything before that. I can get it in json by
> including
> wt=json. I just want to remove Response, numFound, start and docs.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/ResultSet-Solr-tp4035729p4035748.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: ResultSet Solr

Posted by Walter Underwood <wu...@wunderwood.org>.
Why? Just skip over that in the code. --wunder

On Jan 23, 2013, at 12:50 PM, hassancrowdc wrote:

> no I wanted it in json. i want it to start from where square bracket starts [
> . I want to remove everything before that. I can get it in json by including
> wt=json. I just want to remove Response, numFound, start and docs. 
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/ResultSet-Solr-tp4035729p4035748.html
> Sent from the Solr - User mailing list archive at Nabble.com.





Re: ResultSet Solr

Posted by Upayavira <uv...@odoko.co.uk>.
If you can handle it in XML, use wt=xml&tr=foo.xsl and use a stylesheet
to format it as you want.

Upayavira

On Wed, Jan 23, 2013, at 08:53 PM, Rafał Kuć wrote:
> Hello!
> 
> As far as I know you can't remove the response, numFound, start and
> docs. This is how the response is prepared by Solr and apart from
> removing the header, you can't do anything. 
> 
> -- 
> Regards,
>  Rafał Kuć
>  Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch -
>  ElasticSearch
> 
> > no I wanted it in json. i want it to start from where square bracket starts [
> > . I want to remove everything before that. I can get it in json by including
> > wt=json. I just want to remove Response, numFound, start and docs. 
> 
> 
> 
> > --
> > View this message in context:
> > http://lucene.472066.n3.nabble.com/ResultSet-Solr-tp4035729p4035748.html
> > Sent from the Solr - User mailing list archive at Nabble.com.
> 

Re: ResultSet Solr

Posted by Rafał Kuć <r....@solr.pl>.
Hello!

As far as I know you can't remove the response, numFound, start and
docs. This is how the response is prepared by Solr and apart from
removing the header, you can't do anything. 

-- 
Regards,
 Rafał Kuć
 Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - ElasticSearch

> no I wanted it in json. i want it to start from where square bracket starts [
> . I want to remove everything before that. I can get it in json by including
> wt=json. I just want to remove Response, numFound, start and docs. 



> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/ResultSet-Solr-tp4035729p4035748.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: ResultSet Solr

Posted by hassancrowdc <ha...@gmail.com>.
no I wanted it in json. i want it to start from where square bracket starts [
. I want to remove everything before that. I can get it in json by including
wt=json. I just want to remove Response, numFound, start and docs. 



--
View this message in context: http://lucene.472066.n3.nabble.com/ResultSet-Solr-tp4035729p4035748.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: ResultSet Solr

Posted by Rafał Kuć <r....@solr.pl>.
Hello!

Maybe you are looking to get the results in plain text if you want to
remove all the XML tags ? If that so, you can try adding wt=csv to get
the response as CSV instead of XML.

-- 
Regards,
 Rafał Kuć
 Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - ElasticSearch

> Thanks. half problem solved. is there anyway i can get rid of the rest:
> response, numFound, start, doc?



> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/ResultSet-Solr-tp4035729p4035733.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: ResultSet Solr

Posted by hassancrowdc <ha...@gmail.com>.
Thanks. half problem solved. is there anyway i can get rid of the rest:
response, numFound, start, doc?



--
View this message in context: http://lucene.472066.n3.nabble.com/ResultSet-Solr-tp4035729p4035733.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: ResultSet Solr

Posted by Rafał Kuć <r....@solr.pl>.
Hello!

Try adding omitHeader=true parameter to your query.

-- 
Regards,
 Rafał Kuć
 Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - ElasticSearch

> Is there anyway i can get rid of the response header(response header, status,
> Qtime,response, numFound, start, docs) from the resultset of the query in
> solr. I only want to see the result without this info at the top.



> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/ResultSet-Solr-tp4035729.html
> Sent from the Solr - User mailing list archive at Nabble.com.