Issue in SolrInputDocument on Upgrade time

2019-12-02 Thread vishal patel
-6.1.0.jar or higher. As I checked SolrInputDocument class has changed in solr-solrj-5.5.0. java.lang.IllegalArgumentException: Can not set org.apache.solr.common.SolrInputDocument field com.test.common.MySolrMessage.body to com.google.gson.internal.LinkedTreeMap at

Re: ConcurrentModificationException in SolrInputDocument writeMap

2019-11-18 Thread Tim Swetland
ine in our overridden processAdd method. It looked something like this: @Override public void processAdd(AddUpdateCommand cmd) throws IOException { super.processAdd(cmd); SolrInputDocument doc = cmd.getSolrInputDocument(); // Do stuff and set field in doc super.next.processAdd(cmd); } Once

Re: ConcurrentModificationException in SolrInputDocument writeMap

2019-11-07 Thread Shawn Heisey
t java.util.LinkedHashMap.forEach(LinkedHashMap.java:686) at org.apache.solr.common.SolrInputDocument.writeMap(SolrInputDocument.java:51) This error, as mentioned in the SOLR-8028 issue linked by Edward Ribeiro, sounds like you are re-using objects when you are building SolrInputDocument instances for your

Re: ConcurrentModificationException in SolrInputDocument writeMap

2019-11-07 Thread Edward Ribeiro
so, Does it reuse either SolrInputDocument instances of > fields/values collections between update calls? > > On Wed, Nov 6, 2019 at 8:00 AM Tim Swetland wrote: > > > Nevermind my comment on not having this problem in 8.1. We do have it > there > > as well, I just didn'

Re: ConcurrentModificationException in SolrInputDocument writeMap

2019-11-06 Thread Mikhail Khludnev
Hello, Tim. Please confirm my understanding. Does exception happens in standalone Java ingesting app? If, it's so, Does it reuse either SolrInputDocument instances of fields/values collections between update calls? On Wed, Nov 6, 2019 at 8:00 AM Tim Swetland wrote: > Nevermind my commen

Re: ConcurrentModificationException in SolrInputDocument writeMap

2019-11-06 Thread Tim Swetland
Nevermind my comment on not having this problem in 8.1. We do have it there as well, I just didn't look far enough back in our logs on my initial search. Would still appreciate whatever thoughts anyone might have on the exception. On Wed, Nov 6, 2019 at 10:17 AM Tim Swetland wrote: > I'm current

ConcurrentModificationException in SolrInputDocument writeMap

2019-11-06 Thread Tim Swetland
I'm currently running into a ConcurrentModificationException ingesting data as we attempt to upgrade from Solr 8.1 to 8.2. It's not every document, but it definitely appears regularly in our logs. We didn't run into this problem in 8.1, so I'm not sure what might have changed. I feel like this is p

Re: SolrInputDocument setField method

2019-06-26 Thread Mark Sholund
Solr. > > Thanks, > Sam > https://www.linkedin.com/in/skasimalla > > On Wed, Jun 26, 2019 at 11:52 AM Vincenzo D'Amore > wrote: > >> Hi all, >> >> I have a very basic question related to the SolrInputDocument behaviour. >> >> Looking at S

Re: SolrInputDocument setField method

2019-06-26 Thread Shawn Heisey
On 6/26/2019 9:52 AM, Vincenzo D'Amore wrote: I have a very basic question related to the SolrInputDocument behaviour. Looking at SolrInputDocument source code I found how the method setField works: public void setField(String name, Object value ) { SolrInputField field

Re: SolrInputDocument setField method

2019-06-26 Thread Samuel Kasimalla
Solr, I'm pretty sure it doesn't push this format into Solr. Thanks, Sam https://www.linkedin.com/in/skasimalla On Wed, Jun 26, 2019 at 11:52 AM Vincenzo D'Amore wrote: > Hi all, > > I have a very basic question related to the SolrInputDocument behaviour. > > Lo

SolrInputDocument setField method

2019-06-26 Thread Vincenzo D'Amore
Hi all, I have a very basic question related to the SolrInputDocument behaviour. Looking at SolrInputDocument source code I found how the method setField works: public void setField(String name, Object value ) { SolrInputField field = new SolrInputField( name ); _fields.put( name

Re: Bad type on operand stack: SolrInputDocument not assignable to SolrDocumentBase

2019-01-28 Thread Shawn Heisey
On 1/28/2019 7:45 AM, Will Martin wrote: We are deployed across the globe in many regions with different use patterns. Spring-data-solr is front and center for us and has proven pretty darn stable. "There can be some very strange problems when trying to use SolrJ with Spring.” I'll start

Re: Bad type on operand stack: SolrInputDocument not assignable to SolrDocumentBase

2019-01-28 Thread Will Martin
Hi Shawn: We are deployed across the globe in many regions with different use patterns.Spring-data-solr is front and center for us and has proven pretty darn stable. "There can be some very strange problems when trying to use SolrJ with Spring.”Could you expand on this, so that we might know what m

Re: Bad type on operand stack: SolrInputDocument not assignable to SolrDocumentBase

2019-01-27 Thread girish
Thanks Shawn, it worked like charm removing the solr-common dependency. As part of one the sample tutorial I referred for integrating with the application it had the jar. -- Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Bad type on operand stack: SolrInputDocument not assignable to SolrDocumentBase

2019-01-27 Thread Shawn Heisey
On 1/27/2019 1:17 AM, girish wrote: I have been facing the below issue since yesterday, I get this error when starting spring boot application using version 2.1.1 release and apache solr-common 1.3.0. If anyone else has faced this issue please help me out. I've never heard of a "solr-common" li

Bad type on operand stack: SolrInputDocument not assignable to SolrDocumentBase

2019-01-27 Thread girish
/solr/core/convert/MappingSolrConverter.lambda$write$1(Lorg/springframework/data/mapping/PersistentPropertyAccessor;Lorg/apache/solr/common/SolrDocumentBase;Lorg/springframework/data/solr/core/mapping/SolrPersistentProperty;)V @215: invokevirtual Reason: Type 'org/apache/solr/common/So

Re: API to convert a SolrInputDocument to JSON

2019-01-24 Thread Shawn Heisey
On 1/24/2019 5:06 PM, Pushkar Raste wrote: May be my questions wasn’t clear. By issues I meant will Solrj client for 7.x work to index documents in Solr 4.10 or vice versa. With HttpSolrClient, I would generally expect very good compatibility from 7.x to 4.x. I have done it with no problems.

Re: API to convert a SolrInputDocument to JSON

2019-01-24 Thread Pushkar Raste
r Raste > wrote: > > > > You mean I can use SolrJ 7.x for both indexing documents to both Solr 4 > and > > Solr 7 as well as the SolrInputDocument class from Solrj 7.x > > > > Wouldn’t there be issues if there are any backwards incompatible changes. > > &g

Re: API to convert a SolrInputDocument to JSON

2019-01-23 Thread Erick Erickson
2019 at 5:55 PM Pushkar Raste wrote: > > You mean I can use SolrJ 7.x for both indexing documents to both Solr 4 and > Solr 7 as well as the SolrInputDocument class from Solrj 7.x > > Wouldn’t there be issues if there are any backwards incompatible changes. > > On Wed, Jan 23,

Re: API to convert a SolrInputDocument to JSON

2019-01-23 Thread Walter Underwood
se Shawn. It is migrating ion from Solr 4.10 >> master/slave to Solr Cloud 7.x > > In that case, use SolrJ 7.x, with CloudSolrClient to talk to the new version > and HttpSolrClient to talk to the old version. Use the same SolrInputDocument > objects for both. > > Thanks, > Shawn >

Re: API to convert a SolrInputDocument to JSON

2019-01-23 Thread Pushkar Raste
You mean I can use SolrJ 7.x for both indexing documents to both Solr 4 and Solr 7 as well as the SolrInputDocument class from Solrj 7.x Wouldn’t there be issues if there are any backwards incompatible changes. On Wed, Jan 23, 2019 at 8:09 PM Shawn Heisey wrote: > On 1/23/2019 5:49 PM, Push

Re: API to convert a SolrInputDocument to JSON

2019-01-23 Thread Shawn Heisey
SolrInputDocument objects for both. Thanks, Shawn

Re: API to convert a SolrInputDocument to JSON

2019-01-23 Thread Pushkar Raste
> > However, until all the data is indexed I need keep indexing data in the > old > > cluster as well. We are currently using the Solrj client and constructing > > SolrInputDocument objects to index data. > > > > To avoid conflicts with the old and new jars, I am pl

Re: API to convert a SolrInputDocument to JSON

2019-01-23 Thread Shawn Heisey
On 1/23/2019 5:05 PM, Pushkar Raste wrote: We are setting up cluster with new version Solr and going to reindex data. However, until all the data is indexed I need keep indexing data in the old cluster as well. We are currently using the Solrj client and constructing SolrInputDocument objects to

API to convert a SolrInputDocument to JSON

2019-01-23 Thread Pushkar Raste
Hi, We are setting up cluster with new version Solr and going to reindex data. However, until all the data is indexed I need keep indexing data in the old cluster as well. We are currently using the Solrj client and constructing SolrInputDocument objects to index data. To avoid conflicts with

SolrJ SolrInputDocument#addField doesn't throw an exception

2018-04-02 Thread Leonardo Perez Pulido
Hi all, It would be nice if org.apache.solr.common.SolrInputDocument#addField throw an exception when field name is 'id' and the method detect that the indexed id is not unique, just like the post.jar tool. I was confident that both had the same behavior, so... Thanks.

Re: SolrInputDocument

2016-09-28 Thread Peri Subrahmanya
There wasn’t much to provide but here is the code snippet: > > SolrInputDocument sid = new SolrInputDocument(); > sid.addField(“someField”, “someValue”); > > SolrInputDocument childSid = new SolrInputDocument(); > childSid.add(“someField”, “someValue”); > > sid.addChild

Re: SolrInputDocument

2016-09-28 Thread Alexandre Rafalovitch
de snippet: SolrInputDocument sid = new SolrInputDocument(); sid.addField(“someField”, “someValue”); SolrInputDocument childSid = new SolrInputDocument(); childSid.add(“someField”, “someValue”); sid.addChildDocument(childSid); sendToSolr - this is just a solr http call with the input document. Result:

Re: SolrInputDocument

2016-09-28 Thread Peri Subrahmanya
Sorry Erick, There wasn’t much to provide but here is the code snippet: SolrInputDocument sid = new SolrInputDocument(); sid.addField(“someField”, “someValue”); SolrInputDocument childSid = new SolrInputDocument(); childSid.add(“someField”, “someValue”); sid.addChildDocument(childSid

Re: SolrInputDocument

2016-09-28 Thread Erick Erickson
There is close to zero information here to help diagnose your issue. You might review: http://wiki.apache.org/solr/UsingMailingLists Best, Erick On Wed, Sep 28, 2016 at 10:32 AM, Peri Subrahmanya wrote: > Hi All, > > I have a simple case of indexing a SolrInputDocument

SolrInputDocument

2016-09-28 Thread Peri Subrahmanya
Hi All, I have a simple case of indexing a SolrInputDocument with few ChildSolrInputDocumnets. For some reason, the child documents aren’t getting indexed. Is there any setting in the schema or config.xml that needs to be updated? Thanks -Peri Subrahmanya

Issue in SolrInputDocument

2016-07-21 Thread Bhaumik Joshi
-6.1.0.jar. As i checked SolrInputDocument class has changed in solr-solrj-5.5.0. java.lang.IllegalArgumentException: Can not set org.apache.solr.common.SolrInputDocument field com.test.common.MySolrMessage.body to com.google.gson.internal.LinkedTreeMap at

RE: How to best serialize/deserialize a SolrInputDocument?

2016-06-30 Thread Markus Jelsma
Hello - we use GZipped output streams too for buffering large sets of SolrInputDocument's to disk before indexing. Works fine and SolrInputDocument is very easily compressed as well. Markus -Original message- > From:Sebastian Riemer > Sent: Thursday 30th June 2016 13:56

How to best serialize/deserialize a SolrInputDocument?

2016-06-30 Thread Sebastian Riemer
Hi, I am looking for a way to serialize a SolrInputDocument. I want to store the serialized document in a MySQL table. Later I want to deserialize that document and send it to the Solr server. Currently I am looking at org.apache.solr.client.solrj.request.UpdateRequest and

SolrInputDocument required id in solr5.4 but the same program run on solr5.0 without any id

2016-06-09 Thread pratika.sarda
Hi, SolrInputDocument requires id in solr5.4 but the same program run on solr5.0 without any id on adding doc. org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8983/solr/CampaignCore: [doc=null] missing required field: campaignId at

Antwort: Re: Transforming SolrDocument to SolrInputDocument in Solr 6.0

2016-05-11 Thread Stephan Schubert
I just tried the method. The method is throwing a exception after just passing a solr document of a solr response to the method My source code: SolrDocument currentDoc = DocumentList.get(f); DocumentObjectBinder binder = new DocumentObjectBinder(); SolrInputDocument inputDoc

Re: Transforming SolrDocument to SolrInputDocument in Solr 6.0

2016-05-10 Thread Alexandre Rafalovitch
01:36, Stephan Schubert wrote: > In Solr 6.0 the method ClientUtils.toSolrInputDocument() was removed > (deprecated since 5.5.1, see > https://issues.apache.org/jira/browse/SOLR-8339). What is the best way > now to transform a SolrDocument into a SolrInputDocument? > > Mit fre

Re: Re: Transforming SolrDocument to SolrInputDocument in Solr 6.0

2016-05-10 Thread Erick Erickson
NP, Having to dive into the patch is kind of arcane... On Tue, May 10, 2016 at 8:54 AM, Stephan Schubert wrote: > Ouch... thanks a lot ;) > > > Mit freundlichen Grüßen / Best regards > > Stephan Schubert > Senior Web Application Engineer | IT Engineering Information Oriented > Applications >

Antwort: Re: Transforming SolrDocument to SolrInputDocument in Solr 6.0

2016-05-10 Thread Stephan Schubert
Ouch... thanks a lot ;) Mit freundlichen Grüßen / Best regards Stephan Schubert Senior Web Application Engineer | IT Engineering Information Oriented Applications SICK AG | Erwin-Sick-Str. 1 | 79183 Waldkirch | Germany Phone +49 7681 202-3751 | Fax | mailto:stephan.schub...@sick.de | http://w

Re: Transforming SolrDocument to SolrInputDocument in Solr 6.0

2016-05-10 Thread Erick Erickson
Hmm, looking at the patch I see: DocumentObjectBinder binder = new DocumentObjectBinder(); . . . SolrInputDocument solrInputDoc = binder.toSolrInputDocument(in); But I confess I didn't actually try it. On Tue, May 10, 2016 at 8:41 AM, Stephan Schubert wrote: > In Solr 6.0 th

Transforming SolrDocument to SolrInputDocument in Solr 6.0

2016-05-10 Thread Stephan Schubert
In Solr 6.0 the method ClientUtils.toSolrInputDocument() was removed (deprecated since 5.5.1, see https://issues.apache.org/jira/browse/SOLR-8339). What is the best way now to transform a SolrDocument into a SolrInputDocument? Mit freundlichen Grüßen / Best regards Stephan Schubert Senior Web

Transforming SolrDocument to SolrInputDocument in Solr 6.0

2016-05-10 Thread Stephan Schubert
In Solr 6.0 the method ClientUtils.toSolrInputDocument() was removed (deprecated since 5.5.1, see https://issues.apache.org/jira/browse/SOLR-8339). What is the best way now to transform a SolrDocument into a SolrInputDocument? Mit freundlichen Grüßen / Best regards Stephan Schubert Senior Web

Re: Error creating document SolrInputDocument

2016-02-18 Thread Shawn Heisey
On 2/18/2016 7:07 AM, Bernd Fehling wrote: > the DIH is doing the splitting: > > ... > > xpath="/documents/document/element[@name='dccreator']/value" /> > > ... This DIH config says it's the "dccreator" field, but the schema.xml excerpts you included earlier were the "creator" field. Can you p

Re: Error creating document SolrInputDocument

2016-02-18 Thread Bernd Fehling
Hi Shawn, the DIH is doing the splitting: ... ... Bernd Am 18.02.2016 um 14:42 schrieb Shawn Heisey: > On 2/18/2016 3:45 AM, Bernd Fehling wrote: >> Now this is strange with solr 4.10.4, >> I have a multivalue string field for creator. >> > multiValued="true" /> >> >> And a multivalue stri

Re: Error creating document SolrInputDocument

2016-02-18 Thread Shawn Heisey
On 2/18/2016 3:45 AM, Bernd Fehling wrote: > Now this is strange with solr 4.10.4, > I have a multivalue string field for creator. > multiValued="true" /> > > And a multivalue string field for f_person, prepared for facetting with > docValues. > multiValued="true" docValues="true" /> > > To fill

Error creating document SolrInputDocument

2016-02-18 Thread Bernd Fehling
Now this is strange with solr 4.10.4, I have a multivalue string field for creator. And a multivalue string field for f_person, prepared for facetting with docValues. To fill f_person I use copyField. The input to creator is 43470 bytes long with names, split at ";" for each subfield. Klion

Re: Error: Could not create instance of 'SolrInputDocument'

2015-06-19 Thread Shawn Heisey
On 6/19/2015 5:40 AM, Paul Revere wrote: > Our log files show entries for each member indexed: > > Error: Could not create instance of 'SolrInputDocument'. > ~~ > Exception: org.apache.solr.common.SolrInputDocument There will be a *lot* more detail available on this exc

Error: Could not create instance of 'SolrInputDocument'

2015-06-19 Thread Paul Revere
tc. Eventually the entire collection "is indexed" in this fashion, and we received a message that the collection has been indexed and optimized. Our keyword search fails, returning 0 results. Our log files show entries for each member indexed: Error: Could not create instance o

Re: Solr 4.10.4: Could not create instance of 'SolrInputDocument'

2015-06-18 Thread Erick Erickson
ry > indexing our collections through the CMS interface, our CMS error logs show > the entry 'Could not create instance of 'SolrInputDocument'' for each member > of the collection. This is not a fatal error, as the indexing appears to > cycle through all member

Solr 4.10.4: Could not create instance of 'SolrInputDocument'

2015-06-18 Thread Paul Revere
when we try indexing our collections through the CMS interface, our CMS error logs show the entry 'Could not create instance of 'SolrInputDocument'' for each member of the collection. This is not a fatal error, as the indexing appears to cycle through all members, but each

Re: Performance comparison of uploading SolrInputDocument vs JSONRequestHandler

2014-08-11 Thread Erick Erickson
I think you're worrying about the wrong problem ;) Often, the difference between the JSON and SolrInputDocument decoding on the server is dwarfed by the time it takes the client to assemble the docs to send. Quick test: When you start indexing, how hard is the Solr server working (measure cr

Performance comparison of uploading SolrInputDocument vs JSONRequestHandler

2014-08-11 Thread georgelavash
I have a large number of documents that I am trying to load into SOLR. I am about to begin bench marking this effort, but I thought I would ask here. I have the documents in JSONArrays already. I am most concerned with ingest rate on the server. So I don't mind performing extra work on the cl

Not able to save SolrInputDocument object in Solr database

2014-06-25 Thread Srikanth GONE
Hi, I am getting exception while saving SolrInputDocument object from Java in client Server, but in my local machine it works fine. org.apache.solr.common.SolrException: Unexpected EOF in prolog at [row,col {unknown-source}]: [1,0] at org.apache.solr.handler.loader.XMLLoader.load

Re: Difference between addfield and setfield in SolrInputDocument

2014-03-17 Thread Jack Krupansky
Jack Krupansky -Original Message- From: vit Sent: Monday, March 17, 2014 10:22 AM To: solr-user@lucene.apache.org Subject: Difference between addfield and setfield in SolrInputDocument Could someone explain me, please, the difference between addfield and setfield in SolrInputDocument --

Re: Difference between addfield and setfield in SolrInputDocument

2014-03-17 Thread Furkan KAMACI
); } } Thanks; Furkan KAMACI 2014-03-17 16:22 GMT+02:00 vit : > Could someone explain me, please, the difference between addfield and > setfield in SolrInputDocument > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Difference-between-

Re: Difference between addfield and setfield in SolrInputDocument

2014-03-17 Thread Yonik Seeley
On Mon, Mar 17, 2014 at 10:22 AM, vit wrote: > Could someone explain me, please, the difference between addfield and > setfield in SolrInputDocument addField will add another value to any existing values for the field. setField will just overwrite anything that is already there. -Yoni

Difference between addfield and setfield in SolrInputDocument

2014-03-17 Thread vit
Could someone explain me, please, the difference between addfield and setfield in SolrInputDocument -- View this message in context: http://lucene.472066.n3.nabble.com/Difference-between-addfield-and-setfield-in-SolrInputDocument-tp4124809.html Sent from the Solr - User mailing list archive at

Re: Why SolrInputDocument use a LinkedHashMap

2013-02-14 Thread Andre Bois-Crettez
ge in context: http://lucene.472066.n3.nabble.com/Why-SolrInputDocument-use-a-LinkedHashMap-tp4040195p4040260.html Sent from the Solr - User mailing list archive at Nabble.com. -- André Bois-Crettez Search technology, Kelkoo http://www.kelkoo.com/ Kelkoo SAS Société par Actions Simplifiée Au capit

Re: Why SolrInputDocument use a LinkedHashMap

2013-02-13 Thread Chris Hostetter
: Is the insert order of the fields important for Solr? "svn blame" can frequently be useful for understanding why specific choices were made... http://svn.apache.org/viewvc?view=revision&revision=604951 https://issues.apache.org/jira/browse/SOLR-439 ...nut shell: it may not matter to you wha

Re: Why SolrInputDocument use a LinkedHashMap

2013-02-13 Thread Andre Bois-Crettez
t the SolrInputDocument class use a LinkedHashMap. Is the insert order of the fields important for Solr? Thank you -- View this message in context: http://lucene.472066.n3.nabble.com/Why-SolrInputDocument-use-a-LinkedHashMap-tp4040195.html Sent from the Solr - User mailing list archi

Why SolrInputDocument use a LinkedHashMap

2013-02-13 Thread knort
Programming some tests I found that two SolrInputDocuments with the same fields and values are different. Trying to figure it out why it's happening I found that the SolrInputDocument class use a LinkedHashMap. Is the insert order of the fields important for Solr? Thank you -- View

Re: a way to marshall xml doc into a SolrInputDocument

2012-01-13 Thread Chris Hostetter
: Anyway thanks, seems I'll have to code it myself, not hard, just tedious. you could probably re-use a *log* of what's in XMLLoader -- certinaly easier then starting from scratch -- i just don't know if you'll be able to drop it in and use the API as is. -Hoss

Re: a way to marshall xml doc into a SolrInputDocument

2012-01-13 Thread jmuguruza
Chris Hostetter-3 wrote > > but you're the first person i've ever seen ask about > serializng to Solr's XML format on the client, then parse it again, then > send the SolrInputDocument to Solr (seems like a lot of > gratuitious serialize/desrialze/serialise/etc..

Re: a way to marshall xml doc into a SolrInputDocument

2012-01-13 Thread Chris Hostetter
: Is not there a way to easily marshal that file into a SolrInputDocument? Do : I have to do the parsing myself? : : I need them in java pojo cause I want to modify some fields before indexing. : I would think that is possible with built in methods in Solr but cannot find : a way. the class

Re: a way to marshall xml doc into a SolrInputDocument

2012-01-12 Thread jmuguruza
context: http://lucene.472066.n3.nabble.com/a-way-to-marshall-xml-doc-into-a-SolrInputDocument-tp3654777p3655033.html Sent from the Solr - User mailing list archive at Nabble.com.

Re: a way to marshall xml doc into a SolrInputDocument

2012-01-12 Thread Tomás Fernández Löbbe
t; per file): > > > >GB18030TEST >Test with some GB18030 encoded characters >No accents here >ÕâÊÇÒ»¸ö¹¦ÄÜ >0 > > > > Is not there a way to easily marshal that file into a SolrInputDocument? Do > I have to do the parsing myself? > &

a way to marshall xml doc into a SolrInputDocument

2012-01-12 Thread jmuguruza
If I have individual files in the expected Solr format (having just ONE doc per file): GB18030TEST Test with some GB18030 encoded characters No accents here ÕâÊÇÒ»¸ö¹¦ÄÜ 0 Is not there a way to easily marshal that file into a SolrInputDocument? Do I have to do the

Re: How to add TrieIntField to a SolrInputDocument?

2011-07-13 Thread Gabriele Kahlout
this works: doc.remove("wc"); SolrInputField wcField = new SolrInputField("wc"); wcField.setValue(150, 1.0f); doc.put("wc",wcField); On Wed, Jul 13, 2011 at 4:19 PM, Gabriele Kahlout wrote: > SolrInputDoc

How to add TrieIntField to a SolrInputDocument?

2011-07-13 Thread Gabriele Kahlout
SolrInputDocument doc = new SolrInputDocument(); doc.setField(id, "0"); doc.setField("url", getURL("0")); doc.setField(content, "blah blah blah"); *doc.setField(wc, 150); //wc is of solr.TrieIntField field type

Re: Transform a SolrDocument into a SolrInputDocument

2011-03-22 Thread Marc SCHNEIDER
Ok that's perfectly clear. Thanks a lot for all your answers! Marc. On Mon, Mar 21, 2011 at 4:34 PM, Gora Mohanty wrote: > On Mon, Mar 21, 2011 at 8:33 PM, Marc SCHNEIDER > wrote: > > Hi Erick, > > > > Thanks for your answer. > > I'm a quite newbie to Solr so I'm a little bit confused. > > Do

Re: Transform a SolrDocument into a SolrInputDocument

2011-03-21 Thread Gora Mohanty
On Mon, Mar 21, 2011 at 8:33 PM, Marc SCHNEIDER wrote: > Hi Erick, > > Thanks for your answer. > I'm a quite newbie to Solr so I'm a little bit confused. > Do you mean that (using Solrj in my case) I should add all fields (stored > and not stored) before adding the document to the index? [...] No

Re: Transform a SolrDocument into a SolrInputDocument

2011-03-21 Thread Marc SCHNEIDER
to be aware of. > > Best > Erick > > On Mon, Mar 21, 2011 at 10:20 AM, Marc SCHNEIDER > wrote: > > Hi Péter, > > > > I'm not sure to understand your answer. A SolrInputDocument always > contains > > only stored fields, so I don't see th

RE: Transform a SolrDocument into a SolrInputDocument

2011-03-21 Thread Juan Pablo Mora
@lucene.apache.org Asunto: Re: Transform a SolrDocument into a SolrInputDocument Hi Péter, I'm not sure to understand your answer. A SolrInputDocument always contains only stored fields, so I don't see the problem. I just like to update an existing stored field... Thanks, Marc. 2011/3/21 Pé

Re: Transform a SolrDocument into a SolrInputDocument

2011-03-21 Thread Erick Erickson
arc SCHNEIDER wrote: > Hi Péter, > > I'm not sure to understand your answer. A SolrInputDocument always contains > only stored fields, so I don't see the problem. > I just like to update an existing stored field... > > Thanks, > Marc. > > 2011/3/21 Péter Kir

Re: Transform a SolrDocument into a SolrInputDocument

2011-03-21 Thread Marc SCHNEIDER
Hi Ahmet, That did it, thanks a lot! Marc. On Mon, Mar 21, 2011 at 3:03 PM, Ahmet Arslan wrote: > > Is there a fastest way to do that? I mean transforming a > > SolrDocument into a > > SolrInputDocument? > > Does t

Re: Transform a SolrDocument into a SolrInputDocument

2011-03-21 Thread Marc SCHNEIDER
Hi Péter, I'm not sure to understand your answer. A SolrInputDocument always contains only stored fields, so I don't see the problem. I just like to update an existing stored field... Thanks, Marc. 2011/3/21 Péter Király > Hi Marc, > > as far as I know the best way to do

Re: Transform a SolrDocument into a SolrInputDocument

2011-03-21 Thread Ahmet Arslan
> Is there a fastest way to do that? I mean transforming a > SolrDocument into a > SolrInputDocument? Does these static methods help? org.apache.solr.client.solrj.util.ClientUtils.toSolrDocument() org.apache.solr.client.solrj.util.ClientUtils.toSolrInputDocument()

Re: Transform a SolrDocument into a SolrInputDocument

2011-03-21 Thread Péter Király
ke to know the fastest way (code lines) to update a field of a > document. > So my idea was: > 1) Get a SolrDocument > 2) Add all fields of the SolrDocument to a new SolrInputDocument > 3) Update the field in SolrInputDocument > 4) Add SolrInputDocument to the server and commit it >

Transform a SolrDocument into a SolrInputDocument

2011-03-21 Thread Marc SCHNEIDER
Hello, I'd like to know the fastest way (code lines) to update a field of a document. So my idea was: 1) Get a SolrDocument 2) Add all fields of the SolrDocument to a new SolrInputDocument 3) Update the field in SolrInputDocument 4) Add SolrInputDocument to the server and commit it Is th

"Cloning" SolrInputDocument

2011-02-15 Thread Jeff Schmidt
In the process of handling a type of web service request, I need to create a series of documents for indexing. They differ by only a couple of field values, but share quite a few others. I would like to clone SolrInputDocument and adjust a couple of fields, index that, lather, rinse, repeat

Re: serialize SolrInputDocument to java.io.File and back again?

2009-12-31 Thread Chris Hostetter
: I want to store a SolrInputDocument to the filesystem until it can be sent : to the solr server via the solrj client. out of curiosity: why? ... what is the anticipated delay that leads you to the expectation that there will be an "until it can be sent to the solr server" situation? -Hoss

Re: serialize SolrInputDocument to java.io.File and back again?

2009-12-31 Thread Noble Paul നോബിള്‍ नोब्ळ्
what serialization would you wish to use? you can use java serialization or solrj helps you serialize it as xml or javabin format (org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec) On Thu, Dec 31, 2009 at 6:55 AM, Phillip Rhodes wrote: > I want to store a SolrInputDocument to

serialize SolrInputDocument to java.io.File and back again?

2009-12-30 Thread Phillip Rhodes
I want to store a SolrInputDocument to the filesystem until it can be sent to the solr server via the solrj client. I will be using a quartz job to periodically query a table that contains a listing of SolrInputDocuments stored as java.io.File that need to be processed. Thanks for your time.

Re: solrj - adding a SolrDocument (not a SolrInputDocument)

2007-12-06 Thread Ryan McKinley
Brian Whitman wrote: On Dec 6, 2007, at 3:07 PM, Ryan McKinley wrote: public static SolrInputDocument toSolrInputDocument( SolrDocument d ) { SolrInputDocument doc = new SolrInputDocument(); for( String name : d.getFieldNames() ) { doc.addField( name, d.getFieldValue(name

Re: solrj - adding a SolrDocument (not a SolrInputDocument)

2007-12-06 Thread Brian Whitman
On Dec 6, 2007, at 3:07 PM, Ryan McKinley wrote: public static SolrInputDocument toSolrInputDocument( SolrDocument d ) { SolrInputDocument doc = new SolrInputDocument(); for( String name : d.getFieldNames() ) { doc.addField( name, d.getFieldValue(name), 1.0f

Re: solrj - adding a SolrDocument (not a SolrInputDocument)

2007-12-06 Thread Ryan McKinley
try: public static SolrInputDocument toSolrInputDocument( SolrDocument d ) { SolrInputDocument doc = new SolrInputDocument(); for( String name : d.getFieldNames() ) { doc.addField( name, d.getFieldValue(name), 1.0f ); } return doc; } perhaps we should add this to

solrj - adding a SolrDocument (not a SolrInputDocument)

2007-12-06 Thread Brian Whitman
e to a new server after modifying it slightly d.addField("newField", "somedata"); dest_solrserver.add(d); } but that doesn't work-- add wants a SolrInputDocument, not a SolrDocument. I can't cast or otherwise easily create the former from the latter. How could I do this sort of thing?