Re: Atomic updates using solr-php-client

2018-03-06 Thread Rick Leir
Sami
Why not do the simple case first, with complete document updates. When you have 
that working, you can decide if you want atomic updates too.
Cheers -- Rick

On March 6, 2018 2:26:50 AM EST, Sami al Subhi  wrote:
>Thank you for replying,
>
>Yes that is the one. Unfortunately there is no documentation for this
>library.
>
>I tried to implement other libraries but I couldn't get them running.
>This
>is the easiest library to implement but lacks support and
>documentation.
>
>Thank you and best regards,
>Sami
>
>
>
>--
>Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

-- 
Sorry for being brief. Alternate email is rickleir at yahoo dot com 

Re: Atomic updates using solr-php-client

2018-03-05 Thread Sami al Subhi
Thank you for replying,

Yes that is the one. Unfortunately there is no documentation for this
library.

I tried to implement other libraries but I couldn't get them running. This
is the easiest library to implement but lacks support and documentation.

Thank you and best regards,
Sami



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Atomic updates using solr-php-client

2018-03-05 Thread Shawn Heisey

On 3/5/2018 11:38 PM, Sami al Subhi wrote:

I am using solr-php-client to interact with solr. I came this example that
shows how to add docs:
http://www.ayalon.ch/en/code-samples/solr-php-client-example
  I checked
"service.php" file, more specifically the function "_documentToXmlFragment"
and it does not seem it supports "atomic updates".am I correct? is the only
way is to edit "_documentToXmlFragment" to support updates?


The php clients for Solr are third-party software.  None of them were 
created by the project.


To get help with that software, you need to contact its authors.  It 
seems that there are several codebases with the name "solr-php-client" 
so I do not know which one is the one that you are using.  This MIGHT be 
the correct project, but I can't be sure:


https://github.com/PTCInc/solr-php-client

You'll probably need to examine the library that you're using to see if 
there are hints about where you can get support.


There are a fair number of php clients for Solr.  If that one is not 
doing the job, maybe you can switch to one of the others.


Thanks,
Shawn



Re: Atomic Updates in SOLR

2013-10-30 Thread Shalin Shekhar Mangar
Perhaps you are running the update request more than once accidentally?

Can you try using optimistic update with _version_ while sending the
update? This way, if some part of your code is making a duplicate request
then Solr would throw an error.

See
https://cwiki.apache.org/confluence/display/solr/Updating+Parts+of+Documents


On Wed, Oct 30, 2013 at 3:35 PM, Anupam Bhattacharya anupam...@gmail.comwrote:

 I am working on a offline tagging capability to tag records with a
 thesaurus dictionary of key concepts. I am able to use the update=add
 option using xml and json update calls for a field to update specific
 document field information. Although if I run the same atomic update query
 twice then the multivalued string fields start showing duplicate value in
 the multivalued field.
 e.g. for a field name as tag at the initial it was having copper, iron,
 steel
 After running the atomic update query with field name=tag
 update=addsteel/field I will get the tag field values as following:
 copper, iron, steel, steel. (Thus steel get added twice).
 I looked at RemoveDuplicatesTokenFilterFactory but it helps to remove token
 duplicate not multivalued field duplicates. Is there any updateProcessor to
 stop the incoming duplicate value from indexing ?

 Thanks in advance for any help.

 Regards
 Anupam




-- 
Regards,
Shalin Shekhar Mangar.


Re: Atomic Updates in SOLR

2013-10-30 Thread Anshum Gupta
I am not sure if optimistic concurrency would help in deduplicating but
yes, as Shalin points out, you'll be able to spot issues with your client
code.




On Wed, Oct 30, 2013 at 4:18 PM, Shalin Shekhar Mangar 
shalinman...@gmail.com wrote:

 Perhaps you are running the update request more than once accidentally?

 Can you try using optimistic update with _version_ while sending the
 update? This way, if some part of your code is making a duplicate request
 then Solr would throw an error.

 See

 https://cwiki.apache.org/confluence/display/solr/Updating+Parts+of+Documents


 On Wed, Oct 30, 2013 at 3:35 PM, Anupam Bhattacharya anupam...@gmail.com
 wrote:

  I am working on a offline tagging capability to tag records with a
  thesaurus dictionary of key concepts. I am able to use the update=add
  option using xml and json update calls for a field to update specific
  document field information. Although if I run the same atomic update
 query
  twice then the multivalued string fields start showing duplicate value in
  the multivalued field.
  e.g. for a field name as tag at the initial it was having copper, iron,
  steel
  After running the atomic update query with field name=tag
  update=addsteel/field I will get the tag field values as following:
  copper, iron, steel, steel. (Thus steel get added twice).
  I looked at RemoveDuplicatesTokenFilterFactory but it helps to remove
 token
  duplicate not multivalued field duplicates. Is there any updateProcessor
 to
  stop the incoming duplicate value from indexing ?
 
  Thanks in advance for any help.
 
  Regards
  Anupam
 



 --
 Regards,
 Shalin Shekhar Mangar.




-- 

Anshum Gupta
http://www.anshumgupta.net


Re: Atomic Updates in SOLR

2013-10-30 Thread Shalin Shekhar Mangar
Ah I misread your email. You are actually sending the update twice and
asking about how to dedup the multi-valued field values.

No I don't think we have an update processor which can do that.


On Wed, Oct 30, 2013 at 4:18 PM, Shalin Shekhar Mangar 
shalinman...@gmail.com wrote:

 Perhaps you are running the update request more than once accidentally?

 Can you try using optimistic update with _version_ while sending the
 update? This way, if some part of your code is making a duplicate request
 then Solr would throw an error.

 See
 https://cwiki.apache.org/confluence/display/solr/Updating+Parts+of+Documents


 On Wed, Oct 30, 2013 at 3:35 PM, Anupam Bhattacharya 
 anupam...@gmail.comwrote:

 I am working on a offline tagging capability to tag records with a
 thesaurus dictionary of key concepts. I am able to use the update=add
 option using xml and json update calls for a field to update specific
 document field information. Although if I run the same atomic update query
 twice then the multivalued string fields start showing duplicate value in
 the multivalued field.
 e.g. for a field name as tag at the initial it was having copper, iron,
 steel
 After running the atomic update query with field name=tag
 update=addsteel/field I will get the tag field values as following:
 copper, iron, steel, steel. (Thus steel get added twice).
 I looked at RemoveDuplicatesTokenFilterFactory but it helps to remove
 token
 duplicate not multivalued field duplicates. Is there any updateProcessor
 to
 stop the incoming duplicate value from indexing ?

 Thanks in advance for any help.

 Regards
 Anupam




 --
 Regards,
 Shalin Shekhar Mangar.




-- 
Regards,
Shalin Shekhar Mangar.


Re: Atomic Updates in SOLR

2013-10-30 Thread Anshum Gupta
Think it'll be a good thing to have.
I just created a JIRA for that.
https://issues.apache.org/jira/browse/SOLR-5403

Will try and get to it soon.


On Wed, Oct 30, 2013 at 4:28 PM, Shalin Shekhar Mangar 
shalinman...@gmail.com wrote:

 Ah I misread your email. You are actually sending the update twice and
 asking about how to dedup the multi-valued field values.

 No I don't think we have an update processor which can do that.


 On Wed, Oct 30, 2013 at 4:18 PM, Shalin Shekhar Mangar 
 shalinman...@gmail.com wrote:

  Perhaps you are running the update request more than once accidentally?
 
  Can you try using optimistic update with _version_ while sending the
  update? This way, if some part of your code is making a duplicate request
  then Solr would throw an error.
 
  See
 
 https://cwiki.apache.org/confluence/display/solr/Updating+Parts+of+Documents
 
 
  On Wed, Oct 30, 2013 at 3:35 PM, Anupam Bhattacharya 
 anupam...@gmail.comwrote:
 
  I am working on a offline tagging capability to tag records with a
  thesaurus dictionary of key concepts. I am able to use the update=add
  option using xml and json update calls for a field to update specific
  document field information. Although if I run the same atomic update
 query
  twice then the multivalued string fields start showing duplicate value
 in
  the multivalued field.
  e.g. for a field name as tag at the initial it was having copper, iron,
  steel
  After running the atomic update query with field name=tag
  update=addsteel/field I will get the tag field values as following:
  copper, iron, steel, steel. (Thus steel get added twice).
  I looked at RemoveDuplicatesTokenFilterFactory but it helps to remove
  token
  duplicate not multivalued field duplicates. Is there any updateProcessor
  to
  stop the incoming duplicate value from indexing ?
 
  Thanks in advance for any help.
 
  Regards
  Anupam
 
 
 
 
  --
  Regards,
  Shalin Shekhar Mangar.
 



 --
 Regards,
 Shalin Shekhar Mangar.




-- 

Anshum Gupta
http://www.anshumgupta.net


Re: Atomic Updates in SOLR

2013-10-30 Thread Jack Krupansky
Unfortunately, atomic add is add to a list (append) rather than add to a 
set (only unique values). But, you can use the unique fields update 
processor (solr.UniqFieldsUpdateProcessorFactory) to de-dupe specified 
multivalued fields.


See:
http://lucene.apache.org/solr/4_5_1/solr-core/org/apache/solr/update/processor/UniqFieldsUpdateProcessorFactory.html

My e-book has more examples as well.

-- Jack Krupansky

-Original Message- 
From: Anupam Bhattacharya

Sent: Wednesday, October 30, 2013 6:05 AM
To: solr-user@lucene.apache.org
Subject: Atomic Updates in SOLR

I am working on a offline tagging capability to tag records with a
thesaurus dictionary of key concepts. I am able to use the update=add
option using xml and json update calls for a field to update specific
document field information. Although if I run the same atomic update query
twice then the multivalued string fields start showing duplicate value in
the multivalued field.
e.g. for a field name as tag at the initial it was having copper, iron,
steel
After running the atomic update query with field name=tag
update=addsteel/field I will get the tag field values as following:
copper, iron, steel, steel. (Thus steel get added twice).
I looked at RemoveDuplicatesTokenFilterFactory but it helps to remove token
duplicate not multivalued field duplicates. Is there any updateProcessor to
stop the incoming duplicate value from indexing ?

Thanks in advance for any help.

Regards
Anupam 



Re: Atomic Updates in SOLR

2013-10-30 Thread Jack Krupansky
Oops... need to note that the parameters have changed since Solr 4.4 - I 
gave the link for 4.5.1, but for 4.4 and earlier, use:


http://lucene.eu.apache.org/solr/4_4_0/solr-core/org/apache/solr/update/processor/UniqFieldsUpdateProcessorFactory.html

(My book is for 4.4, but hasn't been updated for 4.5 yet, but the gist of 
the examples is the same.)


-- Jack Krupansky

-Original Message- 
From: Jack Krupansky

Sent: Wednesday, October 30, 2013 9:03 AM
To: solr-user@lucene.apache.org
Subject: Re: Atomic Updates in SOLR

Unfortunately, atomic add is add to a list (append) rather than add to a
set (only unique values). But, you can use the unique fields update
processor (solr.UniqFieldsUpdateProcessorFactory) to de-dupe specified
multivalued fields.

See:
http://lucene.apache.org/solr/4_5_1/solr-core/org/apache/solr/update/processor/UniqFieldsUpdateProcessorFactory.html

My e-book has more examples as well.

-- Jack Krupansky

-Original Message- 
From: Anupam Bhattacharya

Sent: Wednesday, October 30, 2013 6:05 AM
To: solr-user@lucene.apache.org
Subject: Atomic Updates in SOLR

I am working on a offline tagging capability to tag records with a
thesaurus dictionary of key concepts. I am able to use the update=add
option using xml and json update calls for a field to update specific
document field information. Although if I run the same atomic update query
twice then the multivalued string fields start showing duplicate value in
the multivalued field.
e.g. for a field name as tag at the initial it was having copper, iron,
steel
After running the atomic update query with field name=tag
update=addsteel/field I will get the tag field values as following:
copper, iron, steel, steel. (Thus steel get added twice).
I looked at RemoveDuplicatesTokenFilterFactory but it helps to remove token
duplicate not multivalued field duplicates. Is there any updateProcessor to
stop the incoming duplicate value from indexing ?

Thanks in advance for any help.

Regards
Anupam 



Re: Atomic updates with solr cloud in solr 4.4

2013-09-30 Thread Sesha Sendhil Subramanian
The field variant_count is stored and is not the target of a copyfield.
field name=variant_count type=int indexed=true stored=true
required=true multiValued=false/

However I did notice that we were setting the same coreNodeName on both the
shards in core.properties. Removing this property fixed the issue and
updates succeed.

What role does this play in handling updates and why were other queries
using the select handler not failing?

Thanks
Sesha


On Sat, Sep 21, 2013 at 7:59 PM, Yonik Seeley yo...@lucidworks.com wrote:

 I can't reproduce this.
 I tried starting up a 2 shard cluster and then followed the example here:
 http://yonik.com/solr/atomic-updates/

 book1 was on shard2 (port 7574) and everything still worked fine.

  missing required field: variant_count

 Perhaps the problem is document specific... What can you say about
 this variant_count field?
 Is it stored?  Is it the target of a copyField?


 -Yonik
 http://lucidworks.com




 On Tue, Sep 17, 2013 at 12:56 PM, Sesha Sendhil Subramanian
 seshasend...@indix.com wrote:
  curl http://localhost:8983/solr/search/update -H
  'Content-type:application/json' -d '
  [
   {
id:
  c8cce27c1d8129d733a3df3de68dd675!c8cce27c1d8129d733a3df3de68dd675,
link_id_45454 : {set:abcdegff}
   }
  ]'
 
  I have two collections search and meta. I want to do an update in the
  search collection.
  If i pick a document in same shard : localhost:8983, the update succeeds
 
  15350327 [qtp386373885-19] INFO
   org.apache.solr.update.processor.LogUpdateProcessor  ? [search]
  webapp=/solr path=/update params={}
  {add=[6cfcb56ca52b56ccb1377a7f0842e74d!6cfcb56ca52b56ccb1377a7f0842e74d
  (1446444025873694720)]} 0 5
 
  If i pick a document on a different shard : localhost:7574, the update
 fails
 
  15438547 [qtp386373885-75] INFO
   org.apache.solr.update.processor.LogUpdateProcessor  ? [search]
  webapp=/solr path=/update params={} {} 0 1
  15438548 [qtp386373885-75] ERROR org.apache.solr.core.SolrCore  ?
  org.apache.solr.common.SolrException:
  [doc=c8cce27c1d8129d733a3df3de68dd675!c8cce27c1d8129d733a3df3de68dd675]
  missing required field: variant_count
  at
 
 org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:189)
  at
 
 org.apache.solr.update.AddUpdateCommand.getLuceneDocument(AddUpdateCommand.java:73)
  at
 
 org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:210)
  at
 
 org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:69)
  at
 
 org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:51)
  at
 
 org.apache.solr.update.processor.DistributedUpdateProcessor.doLocalAdd(DistributedUpdateProcessor.java:556)
  at
 
 org.apache.solr.update.processor.DistributedUpdateProcessor.versionAdd(DistributedUpdateProcessor.java:692)
  at
 
 org.apache.solr.update.processor.DistributedUpdateProcessor.processAdd(DistributedUpdateProcessor.java:435)
  at
 
 org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:100)
  at
 
 org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.handleAdds(JsonLoader.java:392)
  at
 
 org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.processUpdate(JsonLoader.java:117)
  at
 
 org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.load(JsonLoader.java:101)
  at org.apache.solr.handler.loader.JsonLoader.load(JsonLoader.java:65)
  at
 
 org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:92)
  at
 
 org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74)
  at
 
 org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
  at org.apache.solr.core.SolrCore.execute(SolrCore.java:1904)
  at
 
 org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:659)
  at
 
 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:362)
  at
 
 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:158)
  at
 
 org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
  at
 
 org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
  at
 
 org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
  at
 
 org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
  at
 
 org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
  at
 
 org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
  at
 org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
  at
 
 org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
  at
 
 org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
  at
 
 org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
  at
 
 

Re: Atomic updates with solr cloud in solr 4.4

2013-09-21 Thread Yonik Seeley
I can't reproduce this.
I tried starting up a 2 shard cluster and then followed the example here:
http://yonik.com/solr/atomic-updates/

book1 was on shard2 (port 7574) and everything still worked fine.

 missing required field: variant_count

Perhaps the problem is document specific... What can you say about
this variant_count field?
Is it stored?  Is it the target of a copyField?


-Yonik
http://lucidworks.com




On Tue, Sep 17, 2013 at 12:56 PM, Sesha Sendhil Subramanian
seshasend...@indix.com wrote:
 curl http://localhost:8983/solr/search/update -H
 'Content-type:application/json' -d '
 [
  {
   id:
 c8cce27c1d8129d733a3df3de68dd675!c8cce27c1d8129d733a3df3de68dd675,
   link_id_45454 : {set:abcdegff}
  }
 ]'

 I have two collections search and meta. I want to do an update in the
 search collection.
 If i pick a document in same shard : localhost:8983, the update succeeds

 15350327 [qtp386373885-19] INFO
  org.apache.solr.update.processor.LogUpdateProcessor  ? [search]
 webapp=/solr path=/update params={}
 {add=[6cfcb56ca52b56ccb1377a7f0842e74d!6cfcb56ca52b56ccb1377a7f0842e74d
 (1446444025873694720)]} 0 5

 If i pick a document on a different shard : localhost:7574, the update fails

 15438547 [qtp386373885-75] INFO
  org.apache.solr.update.processor.LogUpdateProcessor  ? [search]
 webapp=/solr path=/update params={} {} 0 1
 15438548 [qtp386373885-75] ERROR org.apache.solr.core.SolrCore  ?
 org.apache.solr.common.SolrException:
 [doc=c8cce27c1d8129d733a3df3de68dd675!c8cce27c1d8129d733a3df3de68dd675]
 missing required field: variant_count
 at
 org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:189)
 at
 org.apache.solr.update.AddUpdateCommand.getLuceneDocument(AddUpdateCommand.java:73)
 at
 org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:210)
 at
 org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:69)
 at
 org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:51)
 at
 org.apache.solr.update.processor.DistributedUpdateProcessor.doLocalAdd(DistributedUpdateProcessor.java:556)
 at
 org.apache.solr.update.processor.DistributedUpdateProcessor.versionAdd(DistributedUpdateProcessor.java:692)
 at
 org.apache.solr.update.processor.DistributedUpdateProcessor.processAdd(DistributedUpdateProcessor.java:435)
 at
 org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:100)
 at
 org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.handleAdds(JsonLoader.java:392)
 at
 org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.processUpdate(JsonLoader.java:117)
 at
 org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.load(JsonLoader.java:101)
 at org.apache.solr.handler.loader.JsonLoader.load(JsonLoader.java:65)
 at
 org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:92)
 at
 org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74)
 at
 org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
 at org.apache.solr.core.SolrCore.execute(SolrCore.java:1904)
 at
 org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:659)
 at
 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:362)
 at
 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:158)
 at
 org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
 at
 org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
 at
 org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
 at
 org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
 at
 org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
 at
 org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
 at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
 at
 org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
 at
 org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
 at
 org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
 at
 org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
 at
 org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
 at
 org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
 at org.eclipse.jetty.server.Server.handle(Server.java:368)
 at
 org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
 at
 org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
 at
 org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:953)
 at
 

Re: Atomic updates with solr cloud in solr 4.4

2013-09-17 Thread Yonik Seeley
On Tue, Sep 17, 2013 at 10:47 AM, Sesha Sendhil Subramanian
seshasend...@indix.com wrote:
 I am using solr 4.4 in solr cloud configuration. When i try to 'set' a
 field in a document using the update request handler, I get a 'missing
 required field' error.

Can you show the exact error message you get, and the update you are
trying to send?

-Yonik
http://lucidworks.com


Re: Atomic updates with solr cloud in solr 4.4

2013-09-17 Thread Sesha Sendhil Subramanian
curl http://localhost:8983/solr/search/update -H
'Content-type:application/json' -d '
[
 {
  id:
c8cce27c1d8129d733a3df3de68dd675!c8cce27c1d8129d733a3df3de68dd675,
  link_id_45454 : {set:abcdegff}
 }
]'

I have two collections search and meta. I want to do an update in the
search collection.
If i pick a document in same shard : localhost:8983, the update succeeds

15350327 [qtp386373885-19] INFO
 org.apache.solr.update.processor.LogUpdateProcessor  ? [search]
webapp=/solr path=/update params={}
{add=[6cfcb56ca52b56ccb1377a7f0842e74d!6cfcb56ca52b56ccb1377a7f0842e74d
(1446444025873694720)]} 0 5

If i pick a document on a different shard : localhost:7574, the update fails

15438547 [qtp386373885-75] INFO
 org.apache.solr.update.processor.LogUpdateProcessor  ? [search]
webapp=/solr path=/update params={} {} 0 1
15438548 [qtp386373885-75] ERROR org.apache.solr.core.SolrCore  ?
org.apache.solr.common.SolrException:
[doc=c8cce27c1d8129d733a3df3de68dd675!c8cce27c1d8129d733a3df3de68dd675]
missing required field: variant_count
at
org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:189)
at
org.apache.solr.update.AddUpdateCommand.getLuceneDocument(AddUpdateCommand.java:73)
at
org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:210)
at
org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:69)
at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:51)
at
org.apache.solr.update.processor.DistributedUpdateProcessor.doLocalAdd(DistributedUpdateProcessor.java:556)
at
org.apache.solr.update.processor.DistributedUpdateProcessor.versionAdd(DistributedUpdateProcessor.java:692)
at
org.apache.solr.update.processor.DistributedUpdateProcessor.processAdd(DistributedUpdateProcessor.java:435)
at
org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:100)
at
org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.handleAdds(JsonLoader.java:392)
at
org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.processUpdate(JsonLoader.java:117)
at
org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.load(JsonLoader.java:101)
at org.apache.solr.handler.loader.JsonLoader.load(JsonLoader.java:65)
at
org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:92)
at
org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1904)
at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:659)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:362)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:158)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:368)
at
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
at
org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
at
org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:953)
at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1014)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
at
org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
at
org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:722)

Sesha