Re: Update JSON not working for me
I haven't modified any schema or config. I am going to do it all over...clean install. I tried with 3.6 and I have the same issue. I am going to try with 4.x one more time, its been painful, I am so excited to use Solr for my project, and seems I am stuck on the basics. Thanks Rajesh -- View this message in context: http://lucene.472066.n3.nabble.com/Update-JSON-not-working-for-me-tp3983709p3983759.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: - Solr 4.0 - How do I enable JSP support ? ...
http://localhost:8983/solr/#/~cloud I get the 404 error Loading of undefined failed with HTTP-Status 404 I am using the nightly build, apache-solr-4.0-2012-05-15_08-20-37 Thanks Rajesh -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-4-0-How-do-I-enable-JSP-support-tp3983763p3984183.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Update JSON not working for me
Hi I have tried with the latest nightly build apache-solr-4.0-2012-05-15_08-20-37 I am trying on a Windows 64 bit OS, I believe you have tested this on the LINUX box (based on the shell script) Not sure what I am missing, but the doesn't seem to work: I have changed the URL to just call the update?commit=true Secondly, I have removed the extra quote in the URL for CURL, Windows doesn't seem to like. C:\Tools\Solr\apache-solr-4.0-2012-05-15_08-20-37\example\exampledocs>C:\tools\curl\curl http://localhost:8983/solr/update?commit=true --data-binary @books.json -H 'Content-type:application/json' 0195 My output is http://localhost:8983/solr/select?q=title:monsters&wt=json&indent=true { "responseHeader":{ "status":0, "QTime":1, "params":{ "indent":"true", "wt":"json", "q":"title:monsters"}}, "response":{"numFound":0,"start":0,"docs":[] }} Has anyone tried this with the latest nightly build on Windows 64 bit OS? Trying to figure out what is the difference. Thanks Rajesh -- View this message in context: http://lucene.472066.n3.nabble.com/Update-JSON-not-working-for-me-tp3983709p3984185.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Update JSON not working for me
Hi I have tried with the latest nightly build apache-solr-4.0-2012-05-15_08-20-37 I am trying on a Windows 64 bit OS, I believe you have tested this on the LINUX box (based on the shell script) Not sure what I am missing, but the doesn't seem to work: I have changed the URL to just call the update?commit=true Secondly, I have removed the extra quote in the URL for CURL, Windows doesn't seem to like. C:\Tools\Solr\apache-solr-4.0-2012-05-15_08-20-37\example\exampledocs>C:\tools\curl\curl http://localhost:8983/solr/update?commit=true --data-binary @books.json -H 'Content-type:application/json' 0195 My output is http://localhost:8983/solr/select?q=title:monsters&wt=json&indent=true { "responseHeader":{ "status":0, "QTime":1, "params":{ "indent":"true", "wt":"json", "q":"title:monsters"}}, "response":{"numFound":0,"start":0,"docs":[] }} Has anyone tried this with the latest nightly build on Windows 64 bit OS? Trying to figure out what is the difference. Thanks Rajesh -- View this message in context: http://lucene.472066.n3.nabble.com/Update-JSON-not-working-for-me-tp3983709p3984184.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: - Solr 4.0 - How do I enable JSP support ? ...
java -jar start.jar -OPTIONS=jsp What is SolrCloud...sorry newbie to Solr. Thanks Rajesh -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-4-0-How-do-I-enable-JSP-support-tp3983763p3984195.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Update JSON not working for me
Hi, No. Changing to name:monsters didn't work Here is my guess, the UpdateJSON is not adding any new documents to the existing index. The document count remains the same after I call the UpdateJSON. I am new to Solr, my guess is that if there is some underlying schema that dictates what can be added, maybe we have to fix that. I created a money.json which is modelled on the existing money.xml and tried to added a currency to the existing currencies, but it doesn't work either. The XML Updates handler works perfectly fine, it's the JSON handler which is causing me the troubles. I am ready to dig deeper, if you can tell me what to look for... Thanks Rajesh -- View this message in context: http://lucene.472066.n3.nabble.com/Update-JSON-not-working-for-me-tp3983709p3984205.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Update JSON not working for me
Hi Firstly, apologies for the long post, I changed the quote to double quote (and sometimes it is messy copying from DOS windows) Here is the command and the output on the Jetty Server Window. I am highlighting some important pieces, I have enabled the LOG LEVEL to DEBUG on the JETTY window. C:\Tools\Solr\apache-solr-4.0-2012-05-15_08-20-37\example\exampledocs>C:\tools\curl\curl "http://localhost:8983/solr/update?commit=true"; --data-binary @books.js on -H 'Content-type:application/json' 01930 2012-05-16 16:05:49.636:DBUG:oejw.WebAppClassLoader:loaded class org.apache.solr.core.IndexDeletionPolicyWrapper$IndexCommitWrapper from WebAppClassLoader=sol May 16, 2012 4:05:49 PM org.apache.solr.core.SolrDeletionPolicy onInit INFO: SolrDeletionPolicy.onInit: commits:num=1 commit{dir=C:\Tools\Solr\apache-solr-4.0-2012-05-15_08-20-37\example\solr\data\index,segFN=segments_3,generation=3,filenames=[_1_nrm.cfs, _0_0.frq, _0 May 16, 2012 4:05:49 PM org.apache.solr.core.SolrDeletionPolicy updateCommits *INFO: newest commit = 3* 2012-05-16 16:05:49.723:DBUG:oejw.WebAppClassLoader:loaded interface java.util.concurrent.Future 2012-05-16 16:05:49.737:DBUG:oejw.WebAppClassLoader:loaded interface java.util.concurrent.Future from null May 16, 2012 4:05:49 PM org.apache.solr.update.DirectUpdateHandler2 commit INFO: start commit{flags=0,version=0,optimize=false,openSearcher=true,waitSearcher=true,expungeDeletes=false,softCommit=false} 2012-05-16 16:05:49.781:DBUG:oejw.WebAppClassLoader:loaded class org.apache.lucene.index.BufferedDeletesStream$ApplyDeletesResult from WebAppClassLoader=solr@ May 16, 2012 4:05:49 PM org.apache.solr.search.SolrIndexSearcher INFO: Opening Searcher@1cac622a main 2012-05-16 16:05:49.835:DBUG:oejw.WebAppClassLoader:loaded class org.apache.solr.core.SolrCore$2 from WebAppClassLoader=solr@62ebcdbb 2012-05-16 16:05:49.849:DBUG:oejw.WebAppClassLoader:loaded class org.apache.solr.core.SolrCore$4 from WebAppClassLoader=solr@62ebcdbb May 16, 2012 4:05:49 PM org.apache.solr.update.DirectUpdateHandler2 commit INFO: end_commit_flush 2012-05-16 16:05:49.865:DBUG:oejw.WebAppClassLoader:loaded class org.apache.solr.search.SolrIndexSearcher$8 from WebAppClassLoader=solr@62ebcdbb May 16, 2012 4:05:49 PM org.apache.solr.core.QuerySenderListener newSearcher INFO: QuerySenderListener sending requests to Searcher@1cac622a main{StandardDirectoryReader(segments_3:5 _0(4.0):Cv32 _1(4.0):C2)} May 16, 2012 4:05:49 PM org.apache.solr.core.QuerySenderListener newSearcher INFO: QuerySenderListener done. May 16, 2012 4:05:49 PM org.apache.solr.core.SolrCore registerSearcher INFO: [collection1] Registered new searcher Searcher@1cac622a main{StandardDirectoryReader(segments_3:5 _0(4.0):Cv32 _1(4.0):C2)} May 16, 2012 4:05:49 PM org.apache.solr.update.processor.LogUpdateProcessor finish INFO: [collection1] webapp=/solr path=/update params={commit=true&[ { "id" : "978-0641723445", "cat" : ["book","hardcover"], "name" : "The Lightning Thief", "author" : "Rick Riordan", "series_t" : "Percy Jackson and the Olympians", "sequence_i" : 1, "genre_s" : "fantasy", "inStock" : true, "price" : 12.50, "pages_i" : 384 } , { "id" : "978-1423103349", "cat" : ["book","paperback"], "name" : "The Sea of Monsters", "author" : "Rick Riordan", "series_t" : "Percy Jackson and the Olympians", "sequence_i" : 2, "genre_s" : "fantasy", "inStock" : true, "price" : 6.49, "pages_i" : 304 } , { "id" : "978-1857995879", "cat" : ["book","paperback"], "name" : "Sophie's World : The Greek Philosophers", "author" : "Jostein Gaarder", "sequence_i" : 1, "genre_s" : "fantasy", "inStock" : true, "price" : 3.07, "pages_i" : 64 } , { "id" : "978-1933988177", "cat" : ["book","paperback"], "name" : "Lucene in Action, Second Edition", "author" : "Michael McCandless", "sequence_i" : 1, "genre_s" : "IT", "inStock" : true, "price" : 30.50, "pages_i" : 475 } ] =} {commit=} 0 1930 2012-05-16 16:05:50.621:DBUG:oejw.WebAppClassLoader:loaded class org.apache.solr.response.TextResponseWriter from WebAppClassLoader=solr@62ebcdbb 2012-05-16 16:05:50.634:DBUG:oejw.WebAppClassLoader:loaded class org.apache.solr.response.XMLWriter from WebAppClassLoader=solr@62ebcdbb 2012-05-16 16:05:50.651:DBUG:oejw.WebAppClassLoader:loaded class org.apache.lucene.document.Document from WebAppClassLoader=solr@62ebcdbb 2012-05-16 16:05:50.666:DBUG:oejw.WebAppClassLoader:loaded class org.apache.solr.common.SolrDocument from WebAppClassLoader=solr@62ebcdbb 2012-05-16 16:05:50.683:DBUG:oejw.WebAppClassLoader:loaded class org.apache.solr.common.SolrDocumentList from WebAppClassLoader=solr@62ebcdbb 2012-05-16 16:05:50.698:DBUG:oejw.WebAppClassLoader:loaded class org.apache.solr.common.util.XML from WebAppClassLoader=solr@62ebcdbb 2012-05-16 16:05:50.713:DBUG:oejs.Server:RESPONSE /solr/update 200 2012-05-16 16:05:50.743:DBUG:
Re: Update JSON not working for me
Yonik You are the best !!! Yes, as soon as I changed the "Content-type:application/json" it worked. Now I can see all my updates to the book category. I am ready to roll, thanks for the patience and help. regards Rajesh -- View this message in context: http://lucene.472066.n3.nabble.com/Update-JSON-not-working-for-me-tp3983709p3984236.html Sent from the Solr - User mailing list archive at Nabble.com.
Solr 4.0 commit parameter 'waitFlush'
I am using the commit parameter waitFlush, and seems it throws an exception in 4.0 I am not sure what is the purpose of this parameter and whether it is required or not SEVERE: org.apache.solr.common.SolrException: Unknown commit parameter 'waitFlush' at org.apache.solr.handler.RequestHandlerUtils.validateCommitParams(RequestHandlerUtils.java:85) at org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.parseCommitOptions(JsonLoader.java:248) at org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.processUpdate(JsonLoader.java:137) at org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.load(JsonLoader.java:96) at org.apache.solr.handler.loader.JsonLoader.load(JsonLoader.java:60) at org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:92) http://wiki.apache.org/solr/UpdateJSON#Update_Commands Maybe this would be documentation issue.. . Thanks Rajesh -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-4-0-commit-parameter-waitFlush-tp3984252.html Sent from the Solr - User mailing list archive at Nabble.com.
Posting JSON Data to Solr using XHR?
Hi I am trying to post JSON Data to Solr using XHR / JQuery and it doesn't seem to work. I don't get any exception on the jetty console. Has anyone tried this before and are their any obvious gotchas in my code. Here is my code snippet $(document).ready(function(){ var url='http://localhost:8983/solr/update?commit=true'; var name = $("#name").val(); $('button').click(function(){ // Assign handlers immediately after making the request, // and remember the jqxhr object for this request alert("Button Clicked"); var jqxhr = $.post(url, { "id" : "978-0545139700", "cat" : "book", "name" : "Harry Potter and the Deathly Hallows", "author" : "J K Rowling", "price" : "13.65", "pages_i" : "787" }, function(data) { alert("Data Loaded: " + data); // I don't get this alert }); // perform other work here ... // Set another completion function for the request above jqxhr.complete(function(){ alert("second complete"); }); // I get this alert Here is the message on the console. 2012-05-16 21:50:21.457:DBUG:oejs.ServletHandler:servlet /solr|/update|null -> default 2012-05-16 21:50:21.457:DBUG:oejs.ServletHandler:chain=SolrRequestFilter->default 2012-05-16 21:50:21.457:DBUG:oejs.ServletHandler:call filter SolrRequestFilter May 16, 2012 9:50:21 PM org.apache.solr.update.DirectUpdateHandler2 commit INFO: start commit{flags=0,version=0,optimize=false,openSearcher=true,waitSearcher=true,expungeDeletes=false,softCommit=false} May 16, 2012 9:50:21 PM org.apache.solr.search.SolrIndexSearcher INFO: Opening Searcher@56101751 main May 16, 2012 9:50:21 PM org.apache.solr.update.DirectUpdateHandler2 commit INFO: end_commit_flush May 16, 2012 9:50:21 PM org.apache.solr.core.QuerySenderListener newSearcher INFO: QuerySenderListener sending requests to Searcher@56101751 main{StandardDirectoryReader(segments_c:31 _0(4.0):Cv32 _1(4.0):C2 _3(4.0):C4)} May 16, 2012 9:50:21 PM org.apache.solr.core.QuerySenderListener newSearcher INFO: QuerySenderListener done. May 16, 2012 9:50:21 PM org.apache.solr.core.SolrCore registerSearcher INFO: [collection1] Registered new searcher Searcher@56101751 main{StandardDirectoryReader(segments_c:31 _0(4.0):Cv32 _1(4.0):C2 _3(4.0):C4)} May 16, 2012 9:50:21 PM org.apache.solr.update.processor.LogUpdateProcessor finish *INFO: [collection1] webapp=/solr path=/update params={id=978-0545139700&author=J+K+Rowling&cat=book&price=13.65&pages_i=787&commit=true&name=Harry+Potter+and+the+Deathly+Hallows} {commit=} 0 29 **2012-05-16 21:50:21.488:DBUG:oejs.Server:RESPONSE /solr/update 200* 2012-05-16 21:51:11.488:DBUG:oejh.HttpParser:filled -1/0 2012-05-16 21:51:11.489:DBUG:oejs.AbstractHttpConnection:closed BlockingHttpConnection@627e9505,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=0,l=0,c=-3},r=1 -- View this message in context: http://lucene.472066.n3.nabble.com/Posting-JSON-Data-to-Solr-using-XHR-tp3984309.html Sent from the Solr - User mailing list archive at Nabble.com.
MongoDB and Solr
Hi I am building web app/mobile app, where users can update information frequently and there is a search function to quick search the information using different types of searches. Most of the data is going to be posted in JSON Format and stored in JSON format I have a few questions on the architecture choices, I am relatively new to Solr and MongoDB. 1. Should I use MongoDB to store the JSON documents, or does Solr natively store the documents in the data directory 2. Does Solr require a specific schema for the JSON document. Thanks Rajesh -- View this message in context: http://lucene.472066.n3.nabble.com/MongoDB-and-Solr-tp3986636.html Sent from the Solr - User mailing list archive at Nabble.com.
MongoDB and Solr
Hi I am building web app/mobile app, where users can update information frequently and there is a search function to quick search the information using different types of searches. Most of the data is going to be posted in JSON Format and stored in JSON format I have a few questions on the architecture choices, I am relatively new to Solr and MongoDB. 1. Should I use MongoDB to store the JSON documents, or does Solr natively store the documents in the data directory 2. Does Solr require a specific schema for the JSON document. Thanks Rajesh -- View this message in context: http://lucene.472066.n3.nabble.com/MongoDB-and-Solr-tp3986637.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: MongoDB and Solr
Hi Jack Thanks for the information. I do have multi-level nesting of JSON data. So back to my questions, apologize for repeating... 1. Should I use MongoDB to store the JSON documents, or does Solr natively store the documents in the data directory 2. Does Solr require a specific schema for the JSON document. Thanks Rajesh -- View this message in context: http://lucene.472066.n3.nabble.com/MongoDB-and-Solr-tp3986637p3986662.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: MongoDB and Solr
Hi This is a sample schema, but it can be more nested as I build the app. As more students enroll, or more classes are added, it will grow. colleges [ "college": { "id" : "college Id" "classes": [ { "id": "0001", "type": "speech", "name": "Speech Class", "credits": 3, "students": { { "id": "1001", "name": "ABC", }, { "id": "1002", "name": "PQQ",... }, { "id": "1003", "name": "AAA",... }, { "id": "1004", "name": "ASA",... } }, "instructors": [ { "id": "5001", "name": "ASAS" }, { "id": "5002", "name": "ASAA" }, ] }, ] "locations": [ { "id": "6001", "address": "Address-1" }, { "id": "6001", "address": "Address-2" }, ] } ] -- View this message in context: http://lucene.472066.n3.nabble.com/MongoDB-and-Solr-tp3986637p3986676.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: MongoDB and Solr
Hi Gora, I am working on a Mobile App, which is updating/accessing/searching data and I have created a simple prototype using Solr and the Update JSON / Get JSON functions of Solr. I came across some discussion on MongoDB and how it natively stores JSON data, and hence as I was looking at scalability of data storage/indexing, I was pausing to understand if I am on the right track of just using Solr or should I combine Solr with MongoDB as I am reading this blog post... http://blog.knuthaugen.no/2010/04/cooking-with-mongodb-and-solr.html http://blog.knuthaugen.no/2010/04/cooking-with-mongodb-and-solr.html Maybe this is an incorrect question, as you say -- MongoDB might be an entirely different beast. Apologies for a novice question. My point was, for Mobile / Consumer Web Apps -- what are the architectural considerations. I don't want it to be a overkill, hence if solr can natively store/index/search json documents, then that is the solution I can build on top of. Thanks Rajesh -- View this message in context: http://lucene.472066.n3.nabble.com/MongoDB-and-Solr-tp3986636p3986729.html Sent from the Solr - User mailing list archive at Nabble.com.