Re: program termination in solrj
okay, i did a mistake, i did not refresh the stats,so the stats after running java program: commits:1 autocommits:0 soft autocommits:0 optimizes:0 rollbacks:0 expungeDeletes:0 docsPending:0 adds:0 deletesById:0 deletesByQuery:0 errors:0 cumulative_adds:1 cumulative_deletesById:0 cumulative_deletesByQuery:0 cumulative_errors:0 -- View this message in context: http://lucene.472066.n3.nabble.com/program-termination-in-solrj-tp4107706p4107754.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: program termination in solrj
also my default search handler has no dismax. explicit 20 * contents 2.1 -- View this message in context: http://lucene.472066.n3.nabble.com/program-termination-in-solrj-tp4107706p4107753.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: program termination in solrj
Before and after running client,stats remain same only, class:org.apache.solr.update.DirectUpdateHandler2 version:1.0 description:Update handler that efficiently directly updates the on-disk main lucene index src:$URL: https://svn.apache.org/repos/asf/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java $ stats: commits:0 autocommits:0 soft autocommits:0 optimizes:0 rollbacks:0 expungeDeletes:0 docsPending:0 adds:0 deletesById:0 deletesByQuery:0 errors:0 cumulative_adds:0 cumulative_deletesById:0 cumulative_deletesByQuery:0 cumulative_errors:0 -- View this message in context: http://lucene.472066.n3.nabble.com/program-termination-in-solrj-tp4107706p4107749.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: program termination in solrj
No you don't need to do that. Nutan, Andrea told me that is going to raise the white flag :D Another question: Is possible that your default search handler uses dismax / edismax and therefore the query id:23 is not "valid" and returns 0 docs? Another question: could you try to - get and post the statistics of update handler - run your client (with server.add (doc)) - get and repost the statistics On 21 Dec 2013 18:41, "Nutan" wrote: > do i need to create a new schema.xml ? > > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/program-termination-in-solrj-tp4107706p4107734.html > Sent from the Solr - User mailing list archive at Nabble.com. >
Re: program termination in solrj
do i need to create a new schema.xml ? -- View this message in context: http://lucene.472066.n3.nabble.com/program-termination-in-solrj-tp4107706p4107734.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: program termination in solrj
thru curl, pdf indexing, curl "http://localhost:8080/solr/document/update/extract?literal.id=12&commit=true"; -F"myfile=@C:\solr\document\src\test1\Coding.pdf" -- View this message in context: http://lucene.472066.n3.nabble.com/program-termination-in-solrj-tp4107706p4107730.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: program termination in solrj
How did you get those 14 docs indexed? Could you please post the default search handler config? On 21 Dec 2013 15:53, "Nutan" wrote: > i check as with query: q=id:23, > response is : numfound=0, > > Statictics is: > > Last Modified:16 minutes ago > Num Docs:14 > Max Doc:16 > Deleted Docs:2 > Version:495 > Segment Count:5 > > Also for q=*:* , numfound=14 > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/program-termination-in-solrj-tp4107706p4107725.html > Sent from the Solr - User mailing list archive at Nabble.com. >
Re: program termination in solrj
i check as with query: q=id:23, response is : numfound=0, Statictics is: Last Modified:16 minutes ago Num Docs:14 Max Doc:16 Deleted Docs:2 Version:495 Segment Count:5 Also for q=*:* , numfound=14 -- View this message in context: http://lucene.472066.n3.nabble.com/program-termination-in-solrj-tp4107706p4107725.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: program termination in solrj
Source not found is not a problem and most important thing has nothing to do with solr Where did you see there are no doc in solr? Did you run a query? If so, - what query? - What was the response? - What is the config of the corresponding search handler? - Could you please verify that info in the statistic section of the admin console? I dont see docs in the solr. -- View this message in context: http://lucene.472066.n3.nabble.com/program-termination-in-solrj-tp4107706p4107717.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: program termination in solrj
So is it only because of the sources not found, that the docs dont get indexed??? -- View this message in context: http://lucene.472066.n3.nabble.com/program-termination-in-solrj-tp4107706p4107719.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: program termination in solrj
But those are not errors...the first is red because is write on eclipse stderr...but you can see the INFO level The second is Eclipse debugger that tells you about sources not found...but is not an error...just click on the button, locate sources (if you have) and you will able to debug tjose classes too Andrea On 21 Dec 2013 15:23, "Nutan" wrote: > When i run the console output is this : > <http://lucene.472066.n3.nabble.com/file/n4107716/console.png> > > Which shows that program got terminated. > And from logs i am not able to find the solution. > > When debugged, at many places it shows that: > <http://lucene.472066.n3.nabble.com/file/n4107716/c.png> > > > > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/program-termination-in-solrj-tp4107706p4107716.html > Sent from the Solr - User mailing list archive at Nabble.com. >
Re: program termination in solrj
I dont see docs in the solr. -- View this message in context: http://lucene.472066.n3.nabble.com/program-termination-in-solrj-tp4107706p4107717.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: program termination in solrj
When i run the console output is this : <http://lucene.472066.n3.nabble.com/file/n4107716/console.png> Which shows that program got terminated. And from logs i am not able to find the solution. When debugged, at many places it shows that: <http://lucene.472066.n3.nabble.com/file/n4107716/c.png> -- View this message in context: http://lucene.472066.n3.nabble.com/program-termination-in-solrj-tp4107706p4107716.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: program termination in solrj
Hi Nutan, Is not really clear (at least to me) what your problem is. After you client program ends, are you seeing the doc in SOLR? because the piece of code you pasted I assume is (directly or indirectly) called from a main method...and therefore that program *normally* terminates once did its work Best, Andrea On 21 Dec 2013 15:15, "Nutan" wrote: > I put the breakpoint at line : SolrInputDocument doc1 = new > SolrInputDocument(); > > It initially showed source not found for > Launcher.class,HTTPSolrServer.class. > But now even for URLClassPath.class ,the path to this class is the src.jar > in the jdk directory. > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/program-termination-in-solrj-tp4107706p4107714.html > Sent from the Solr - User mailing list archive at Nabble.com. >
Re: program termination in solrj
I put the breakpoint at line : SolrInputDocument doc1 = new SolrInputDocument(); It initially showed source not found for Launcher.class,HTTPSolrServer.class. But now even for URLClassPath.class ,the path to this class is the src.jar in the jdk directory. -- View this message in context: http://lucene.472066.n3.nabble.com/program-termination-in-solrj-tp4107706p4107714.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: program termination in solrj
Hi; What do you mean with: abnormal termination? Could you explain your situation a bit more? On the other hand do not look at the end of your log file, check the previous lines or open the Solr admin panel and look whether a warning or error exists. Thanks; Furkan KAMACI 21 Aralık 2013 Cumartesi tarihinde Andrea Gazzarini adlı kullanıcı şöyle yazdı: > Where's the error? > On 21 Dec 2013 14:31, "Nutan" wrote: > >> @Manish: i did add() but still the same error. >> >> *Logs* shows this: >> >> INFO: [document] webapp=/solr path=/update params={wt=javabin&version=2} >> {add=[23 (1455037990928646144)]} 0 5 >> Dec 21, 2013 6:56:01 PM org.apache.solr.update.DirectUpdateHandler2 commit >> INFO: start >> >> commit{,optimize=false,openSearcher=true,waitSearcher=true,expungeDeletes=false,softCommit=false,prepareCommit=false} >> Dec 21, 2013 6:56:01 PM org.apache.solr.core.SolrDeletionPolicy onCommit >> INFO: SolrDeletionPolicy.onCommit: commits:num=2 >> >> commit{dir=NRTCachingDirectory(org.apache.lucene.store.MMapDirectory@C >> :\solr\document\data\index >> lockFactory=org.apache.lucene.store.NativeFSLockFactory@71effafc; >> maxCacheMB=48.0 >> ... >> Dec 21, 2013 6:56:01 PM org.apache.solr.spelling.suggest.Suggester build >> INFO: build() >> Dec 21, 2013 6:56:01 PM org.apache.solr.update.DirectUpdateHandler2 commit >> INFO: end_commit_flush >> Dec 21, 2013 6:56:01 PM org.apache.solr.core.SolrCore registerSearcher >> INFO: [document] Registered new searcher Searcher@1b4e87ed >> main{StandardDirectoryReader(segments_9h:463 _3w(4.2):C10/2 _3k(4.2):C1 >> _3x(4.2):C1 _40(4.2):C3 _42(4.2):C1)} >> Dec 21, 2013 6:56:01 PM org.apache.solr.update.processor.LogUpdateProcessor >> finish >> INFO: [document] webapp=/solr path=/update >> >> params={waitSearcher=true&commit=true&wt=javabin&version=2&softCommit=false} >> {commit=} 0 347 >> >> >> >> -- >> View this message in context: >> http://lucene.472066.n3.nabble.com/program-termination-in-solrj-tp4107706p4107709.html >> Sent from the Solr - User mailing list archive at Nabble.com. >> >
Re: program termination in solrj
Where's the error? On 21 Dec 2013 14:31, "Nutan" wrote: > @Manish: i did add() but still the same error. > > *Logs* shows this: > > INFO: [document] webapp=/solr path=/update params={wt=javabin&version=2} > {add=[23 (1455037990928646144)]} 0 5 > Dec 21, 2013 6:56:01 PM org.apache.solr.update.DirectUpdateHandler2 commit > INFO: start > > commit{,optimize=false,openSearcher=true,waitSearcher=true,expungeDeletes=false,softCommit=false,prepareCommit=false} > Dec 21, 2013 6:56:01 PM org.apache.solr.core.SolrDeletionPolicy onCommit > INFO: SolrDeletionPolicy.onCommit: commits:num=2 > > commit{dir=NRTCachingDirectory(org.apache.lucene.store.MMapDirectory@C > :\solr\document\data\index > lockFactory=org.apache.lucene.store.NativeFSLockFactory@71effafc; > maxCacheMB=48.0 > ... > Dec 21, 2013 6:56:01 PM org.apache.solr.spelling.suggest.Suggester build > INFO: build() > Dec 21, 2013 6:56:01 PM org.apache.solr.update.DirectUpdateHandler2 commit > INFO: end_commit_flush > Dec 21, 2013 6:56:01 PM org.apache.solr.core.SolrCore registerSearcher > INFO: [document] Registered new searcher Searcher@1b4e87ed > main{StandardDirectoryReader(segments_9h:463 _3w(4.2):C10/2 _3k(4.2):C1 > _3x(4.2):C1 _40(4.2):C3 _42(4.2):C1)} > Dec 21, 2013 6:56:01 PM org.apache.solr.update.processor.LogUpdateProcessor > finish > INFO: [document] webapp=/solr path=/update > > params={waitSearcher=true&commit=true&wt=javabin&version=2&softCommit=false} > {commit=} 0 347 > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/program-termination-in-solrj-tp4107706p4107709.html > Sent from the Solr - User mailing list archive at Nabble.com. >
Re: program termination in solrj
@Manish: i did add() but still the same error. *Logs* shows this: INFO: [document] webapp=/solr path=/update params={wt=javabin&version=2} {add=[23 (1455037990928646144)]} 0 5 Dec 21, 2013 6:56:01 PM org.apache.solr.update.DirectUpdateHandler2 commit INFO: start commit{,optimize=false,openSearcher=true,waitSearcher=true,expungeDeletes=false,softCommit=false,prepareCommit=false} Dec 21, 2013 6:56:01 PM org.apache.solr.core.SolrDeletionPolicy onCommit INFO: SolrDeletionPolicy.onCommit: commits:num=2 commit{dir=NRTCachingDirectory(org.apache.lucene.store.MMapDirectory@C:\solr\document\data\index lockFactory=org.apache.lucene.store.NativeFSLockFactory@71effafc; maxCacheMB=48.0 ... Dec 21, 2013 6:56:01 PM org.apache.solr.spelling.suggest.Suggester build INFO: build() Dec 21, 2013 6:56:01 PM org.apache.solr.update.DirectUpdateHandler2 commit INFO: end_commit_flush Dec 21, 2013 6:56:01 PM org.apache.solr.core.SolrCore registerSearcher INFO: [document] Registered new searcher Searcher@1b4e87ed main{StandardDirectoryReader(segments_9h:463 _3w(4.2):C10/2 _3k(4.2):C1 _3x(4.2):C1 _40(4.2):C3 _42(4.2):C1)} Dec 21, 2013 6:56:01 PM org.apache.solr.update.processor.LogUpdateProcessor finish INFO: [document] webapp=/solr path=/update params={waitSearcher=true&commit=true&wt=javabin&version=2&softCommit=false} {commit=} 0 347 -- View this message in context: http://lucene.472066.n3.nabble.com/program-termination-in-solrj-tp4107706p4107709.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: program termination in solrj
I think you are missing a call to *add <http://lucene.apache.org/solr/4_1_0/solr-solrj/org/apache/solr/client/solrj/SolrServer.html#add(java.util.Collection)>* (Collection<http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true> http://lucene.apache.org/solr/4_1_0/solr-solrj/org/apache/solr/common/SolrInputDocument.html>> docs) or one of the similar methods. SolrInputDocument doc1 = new SolrInputDocument(); doc1.addField( "id", 23); doc1.addField( "title", "doc1" ); doc1.addField( "author","Chetan Bhagat" ); doc1.addField( "contents", "I am the best." ); doc1.addField( "date_modified", "12-12-2014" ); server.add(doc1); server.commit(); On Sat, Dec 21, 2013 at 5:43 PM, Nutan wrote: > i am trying to index documents with solrj, this is my code, > > import org.apache.solr.client.solrj.SolrServerException; > import org.apache.solr.client.solrj.impl.*; > import org.apache.solr.common.SolrInputDocument; > import java.io.IOException; > > public class index { > > public static void main(String[] args) throws IOException, > SolrServerException { > String url = "http://localhost:8080/solr/document/";; > HttpSolrServer server = new HttpSolrServer( url ); > server.setMaxRetries(1); // defaults to 0. > 1 not recommended. > server.setConnectionTimeout(5000); > server.setSoTimeout(1000); // socket read timeout > server.setDefaultMaxConnectionsPerHost(100); > server.setMaxTotalConnections(100); > server.setFollowRedirects(false); // defaults to false > SolrInputDocument doc1 = new SolrInputDocument(); > doc1.addField( "id", 23); > doc1.addField( "title", "doc1" ); > doc1.addField( "author","Chetan Bhagat" ); > doc1.addField( "contents", "I am the best." ); > doc1.addField( "date_modified", "12-12-2014" ); > server.commit(); > } > } > After running,(running as a java application) the console on eclipse shows > this: > > Dec 21, 2013 2:07:25 AM org.apache.solr.client.solrj.impl.HttpClientUtil > createClient INFO: Creating new http client, > config:maxConnections=128&maxConnectionsPerHost=32&followRedirects=false > > > My schema is: > > > > multiValued="false"/> > required="true" > multiValued="false"/> > multiValued="false"/> > multiValued="true"/> > > multivalued="true"/> > multiValued="false"/> > multiValued="true"/> > > multiValued="true" /> > > > stored="false" /> > > stored="true" /> > > > > Logs does not show any error.Am i following the right process? > What causes this abnormal termination?? > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/program-termination-in-solrj-tp4107706.html > Sent from the Solr - User mailing list archive at Nabble.com. > -- Regards, Manish
program termination in solrj
i am trying to index documents with solrj, this is my code, import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.client.solrj.impl.*; import org.apache.solr.common.SolrInputDocument; import java.io.IOException; public class index { public static void main(String[] args) throws IOException, SolrServerException { String url = "http://localhost:8080/solr/document/";; HttpSolrServer server = new HttpSolrServer( url ); server.setMaxRetries(1); // defaults to 0. > 1 not recommended. server.setConnectionTimeout(5000); server.setSoTimeout(1000); // socket read timeout server.setDefaultMaxConnectionsPerHost(100); server.setMaxTotalConnections(100); server.setFollowRedirects(false); // defaults to false SolrInputDocument doc1 = new SolrInputDocument(); doc1.addField( "id", 23); doc1.addField( "title", "doc1" ); doc1.addField( "author","Chetan Bhagat" ); doc1.addField( "contents", "I am the best." ); doc1.addField( "date_modified", "12-12-2014" ); server.commit(); } } After running,(running as a java application) the console on eclipse shows this: Dec 21, 2013 2:07:25 AM org.apache.solr.client.solrj.impl.HttpClientUtil createClient INFO: Creating new http client, config:maxConnections=128&maxConnectionsPerHost=32&followRedirects=false My schema is: Logs does not show any error.Am i following the right process? What causes this abnormal termination?? -- View this message in context: http://lucene.472066.n3.nabble.com/program-termination-in-solrj-tp4107706.html Sent from the Solr - User mailing list archive at Nabble.com.