Hi Michael - Moving this conversations to the general solr mailing list...
1. SolrSharp example solution works with schema.xml from
apache-solr-1.1.0-incubating. If I'm using schema.xml from apache-solr-1.2.0 example program doesn't update index... I didn't realize the solr 1.2 release code sample schema.xml was different from the solr 1.1 version. In my implementation, I had solr 1.1 already installed and upgraded to 1.2 by replacing the war file (per the instructions in solr.) So, the example code is geared to go against the 1.1schema. For the example code, adding the "timestamp" field in the ExampleIndexDocument public constructor such as: this.Add(new IndexFieldValue("timestamp", DateTime.Now.ToString ("s")+"Z"))); will take care of the solr 1.2 schema invalidation issue. The addition of the @default attribute on this field in the schema is not presently accommodated in the validation routine. If I'm not mistaken, the default attribute value will be applied for all documents without that field present in the xml payload. This would imply that any field with a default attribute is not required for any implemented UpdateIndexDocument. I'll look into this further.
2. When I run example with schema.xml from
apache-solr-1.1.0-incubating program throw Exception Hmmm, can't really help you with this one. It sounds as if solr is incurring an error when the xml is posted to the server. Try the standard step-through troubleshooting routines to see what messages are being passed back from the server. -- j On 6/19/07, Michael Plax <[EMAIL PROTECTED]> wrote:
Hello Jeff, thank you again for updating files. I just run with some problems. I don't know what is the best way to report them solr maillist/solrsharp jira. 1. SolrSharp example solution works with schema.xml from apache-solr-1.1.0-incubating. If I'm using schema.xml from apache-solr-1.2.0 example program doesn't update index because: line 33: if (solrSearcher.SolrSchema.IsValidUpdateIndexDocument(iDoc)) return false. update falls because of configuration file schema.xml file: line 265: <field name="word" type="string" indexed="true" stored="true"/> ... line 279: <field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/> those fields "word", "timestamp" don't pass validation in SolrSchema.csline 217. 2. When I run example with schema.xml from apache-solr-1.1.0-incubating program throw Exception System.Exception was unhandled Message="Http error in request/response to http://localhost:8983/solr/update/" Source="SolrSharp" StackTrace: at org.apache.solr.SolrSharp.Configuration.SolrSearcher.WebPost(String url, Byte[] bytesToPost, String& statusDescription) in E:\SOLR-CSharp\src\Configuration\SolrSearcher.cs:line 229 at org.apache.solr.SolrSharp.Update.SolrUpdater.PostToIndex(IndexDocument oDoc, Boolean bCommit) in E:\SOLR-CSharp\src\Update\SolrUpdater.cs:line 70 at SolrSharpExample.Program.Main(String[] args) in E:\SOLR-CSharp\example\Program.cs:line 35 at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly () at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() xmlstring value from oDoc.SerializeToString() "<?xml version=\"1.0\" encoding=\"utf-8\"?><add xmlns:xsi=\" http://www.w3.org/2001/XMLSchema-instance\<http://www.w3.org/2001/XMLSchema-instance%5C>" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><doc><field<http://www.w3.org/2001/XMLSchema%5C%22%3E%3Cdoc%3E%3Cfield>name=\"id\">101</field><field name=\"name\">One oh one</field><field name=\"manu\">Sony</field><field name=\"cat\">Electronics</field><field name=\"cat\">Computer</field><field name=\"features\">Good</field><field name=\"features\">Fast</field><field name=\"features\">Cheap</field><field name=\"includes\">USB cable</field><field name=\"weight\">1.234</field><field name=\"price\">99.99</field><field name=\"popularity\">1</field><field name=\"inStock\">True</field></doc></add>" I checked all features from Solr tutorial, they are working. I'm running solr on Windows XP Pro without firewall. Do you know how to solve those problems? Do you recommend to handle all communication by maillist/jira ? Regards Michael