rg
: To: solr-user@lucene.apache.org
: Subject: Re: custom response writer which extends RawResponseWriter fails when
: shards > 1
:
: Hi,
: I've ended up processing the doclist in the response twice. Once in the
: write method and once in getContent. Its a bit inefficient but i'm only
: look
riter delegate to the javabin
>> responsewriter if/when you see that this is an "isShard=true" request?
>>
>>
>>
>> : Date: Thu, 19 Apr 2018 18:42:58 +0100
>> : From: Lee Carroll <lee.a.carr...@googlemail.com>
>> : Reply-To: solr-user@lucene.
; : Date: Thu, 19 Apr 2018 18:42:58 +0100
> : From: Lee Carroll <lee.a.carr...@googlemail.com>
> : Reply-To: solr-user@lucene.apache.org
> : To: solr-user@lucene.apache.org
> : Subject: Re: custom response writer which extends RawResponseWriter
> fails when
> : shards >
rg
: To: solr-user@lucene.apache.org
: Subject: Re: custom response writer which extends RawResponseWriter fails when
: shards > 1
:
: Hi,
:
: I rewrote all of my tests to use SolrCloudTestCase rather than SolrTestCaseJ4
: and was able to replicate the responsewriter issue and debug wit
> > > >> > > > > >200 OK
> > > > > > > >> > > > > >
> > > > > > > >> > > > > > logs are clean
> > > > > > > >> > > > > >
>
n4]
> > > org.apache.solr.core.SolrCore;
> > > > > > >> > > > > > [images_shard2_replica_n4] webapp=/solr path=/image
> > > > > > >> > > > > > params={df=text=false&
> > qt=/i
e=4=0=true=
> > > > > >> > > > > > http://10.224.30.207:8983/
> > solr/images_shard2_replica_n4/
> > > > > >> > > > > > |http://10.224.30.207:7574/
> > solr/images_shard2_replica_n6/
> > > > > >> > > > > > =10=2=id:1=
> > > > 1523971232039=true=
ption;
> > > > >> > > > > > org.apache.solr.client.solrj.impl.HttpSolrClient$
> > > > >> > > RemoteSolrException:
> > > > >> > > > > > Error
> > > > >> > > > > > from server at http://10.224.30.207:8983/
> > > at
> > > >> > > > > > org.apache.solr.client.solrj.impl.HttpSolrClient.
> > > >> > > > > > executeMethod(HttpSolrClient.java:607)
> > > >> > > > > > at
> > > >> > > > &g
a:255)
> > >> > > > > > at
> > >> > > > > > org.apache.solr.client.solrj.impl.HttpSolrClient.request(
> > >> > > > > > HttpSolrClient.java:244)
> > >> > > > > > at
> > >> > > > > > org.ap
gt; at
> >> > > > > > org.apache.solr.client.solrj.impl.LBHttpSolrClient.request(
> >> > > > > > LBHttpSolrClient.java:413)
> >> > > > > > at
> >> > > > > > org.apache.solr.handler.component.HttpShardHandlerFactory.
> >&
tureTask.java:266)
>> > > > > > at java.util.concurrent.Executors$RunnableAdapter.
>> > > > > call(Executors.java:511)
>> > > > > > at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>> > > > > > at
>&
; at
> > > > > > java.util.concurrent.ThreadPoolExecutor.runWorker(
> > > > > > ThreadPoolExecutor.java:1142)
> > > > > > at
> > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(
> > > > > > ThreadPoolExecutor.java:617)
> > >
> params={q=id:1}
> > > > > status=200 QTime=17
> > > > > INFO - 2018-04-17 13:20:32.055; [c:images s:shard1 r:core_node3
> > > > > x:images_shard1_replica_n1] org.apache.solr.core.SolrCore;
> > > > > [images_shard1_r
s:shard1 r:core_node3
> > > > x:images_shard1_replica_n1] org.apache.solr.core.SolrCore;
> > > > [images_shard1_replica_n1] webapp=/solr path=/image
> > > > params={df=text=false=/image=id=score&
> > > > shards.purpose=4=0=true=
> > > >
its=1 status=0 QTime=2
> > >
> > >
> > > I've implemented getcontenttype simply as
> > >
> > > @Override
> > > public String getContentType(SolrQueryRequest request,
> > > SolrQueryResponse response) {
> > >
> > > retu
olrQueryRequest request,
> > SolrQueryResponse response) {
> >
> > return "application/json;charset=utf-8";
> > }
> >
> >
> >
> >
> >
> > On 16 April 2018 at 17:37, Mikhail Khludnev <m...@apache.org> wrote:
> >
>
to send a stacktrace for such kind of inquiries.
> > I guess it goes from QueryComponent.mergeIds() or so. Shard response
> should
> > contains from schema.xml field.
> > I encounter something like this while troubleshooting
> > https://lucene.apache.org/solr/guide/6_6/transforming-
>
ud
>
>
> On Mon, Apr 16, 2018 at 6:56 PM, Lee Carroll <lee.a.carr...@googlemail.com
> >
> wrote:
>
> > I've created a custom response writer which extends RawResponseWriter.
> The
> > basic operation is to output a single field value from the top matching
>
-documents.html#TransformingResultDocuments-CoresandCollectionsinSolrCloud
On Mon, Apr 16, 2018 at 6:56 PM, Lee Carroll <lee.a.carr...@googlemail.com>
wrote:
> I've created a custom response writer which extends RawResponseWriter. The
> basic operation is to output a single field value
I've created a custom response writer which extends RawResponseWriter. The
basic operation is to output a single field value from the top matching doc
as the entire response. This works when shards = 1 but fails when shards
are greater than 1.
I throw an error if the field in question is missing
hecking and creating the additional tag for employee name
>or
>item name. These names / additional info are read from our own read
>through
>cache which are loaded in a static block.
>
>Is there a better way/option than customizing the xmlwriter ?
>
>Regards,
>
>
&
; To: solr-user@lucene.apache.org
> Subject: Custom Response writer
>
> Hi,
>
> We have requirement like in the response we would like to add description of
> an item with item id(this field comes from solr response by default) or
> employee name along with employee i
info are read from our own read through
cache which are loaded in a static block.
Is there a better way/option than customizing the xmlwriter ?
Regards,
--
View this message in context:
http://lucene.472066.n3.nabble.com/Custom-Response-writer-tp4340908.html
Sent from the Solr - User mailing
response writer in Solr
that can achieve this functionality?
Regards,
Vineeth
, I get only 1 document that shows only the
top level attributes but does not contain any of the nested json objects.
How can I ensure that I get JSON objects similar to the way they are
originally indexed into Solr? Is there any custom response writer in Solr
that can achieve this functionality
26 matches
Mail list logo