|
Full complement of files for distribution. Here's what's included:
/src More of this is forthcoming, but this is an initial release to get it in the hands of users.
Jeff Rodenburg made changes - 09/Apr/07 10:19 PM
Jeff Rodenburg made changes - 10/Apr/07 01:37 AM
Jeff & Co:
What is the status of this as far as getting it into the repository? Something to do right after 1.2 is fully released? It's still in sync with 1.2 codebase and works, right Jeff? I am having difficulty using SolrSharp in a VB.NET project. I am using .NET 2.0 uncer Windows Vista (VS 2005). The problem is that the document does not pass "IsValidUpdateIndexDocument'
-------------------------------------------------------------- I create a SolrSharp document thus: Imports System.Xml.Serialization <Serializable(), XmlRoot("add")> _ Inherits UpdateIndexDocument Public Sub New() Public Sub New(ByVal id As String, ByVal Diagnosis As String) Then I try to post it like this: Dim solrSearcher As SolrSharp.Configuration.SolrSearcher _ Dim SolrU As New org.apache.solr.SolrSharp.Update.SolrUpdater(solrSearcher) If Not solrSearcher.SolrSchema.IsValidUpdateIndexDocument(doc) Then MessageBox.Show("Cannot validate document: ") Try SolrU.PostToIndex(doc, True) Catch ex As Exception I'm not seeing comments that I've added via email response displayed on this issue, so I'll add them manually.
Regarding question from Otis G. about repository access and 1.2 compliance:
Regarding ms IsValidUpdateIndexDocument issue:
IsValidUpdateIndexDocument compares the fields of the referenced IndexDocument to the fields as read from the Solr configuration for the Solr instance you're updating. If the (non-copied) fields that are read from the solrconfig.xml file are not present in the list of fields from the IndexDocument, IsValidUpdateIndexDocument will fail. In your example, you should have only two fields defined in solrconfig.xml of the solr instance you're updating.
Jeff Rodenburg made changes - 13/Jun/07 10:50 PM
Jeff Rodenburg made changes - 13/Jun/07 10:50 PM
Solrsharp has been validated against the Solr 1.2 release. Validation was made using the example application that's available with the Solrsharp code.
http://solrstuff.org/svn/solrsharp
Jeff,
Thanks. I have it working against Solr 1.2. I am trying to figure out how to delete a document from the index. This is the code I am using and it is not working. TIA Dim SolrU As New org.apache.solr.SolrSharp.Update.SolrUpdater(solrSearcher) There was a bug in DeleteIndexDocument, which has been updated. Deleting by query vs. unique key was not being handled properly. The source at http://solrstuff.org/svn/solrsharp
ms - for your scenario, this issues a delete-by-id request using the xml syntax "<delete><id>a</id></delete>". This is not the same as a delete-by-query, if that's the intention. Please look at the example for code that shows how to delete by query. The Example application includes some code for delete by query, but it is commented out. The particular code looks like:
//List<QueryParameter> listQP = new List<QueryParameter>(); DeleteIndexDocument deleteIndexDocument = new DeleteIndexDocument("101"); Uncomment those and comment out the single DeleteIndexDocument("101") line to execute a delete-by-query. Current Solrsharp library, compliant with Solr version 1.2. For the latest code, please see the Subversion repository at http://solrstuff.org/svn/solrsharp
Jeff Rodenburg made changes - 08/Jul/07 07:12 PM
I am using solrsharp-1.2-07082007 - I have a dynamicField declared in my schema.xml file as
<dynamicField name="*_demo" type="text_ws" indexed="true" stored="true"/> -but, if I try to add a field using my vb.net application doc.Add("id_demo", s) where is a string value, the document does fails solrSearcher.SolrSchema.IsValidUpdateIndexDocument(doc) MS
Jeff Rodenburg made changes - 18/Jul/07 05:05 PM
Jeff Rodenburg made changes - 18/Jul/07 05:07 PM
Includes updates to SOLR-304. Replaces solrsharp-1.2-07082007.zip
Jeff Rodenburg made changes - 18/Jul/07 05:36 PM
Jeff Rodenburg made changes - 18/Jul/07 06:53 PM
With solrsharp-1.2-07082007 I am able to use dynamicFields. However, I have a problem with copyFiels that reference dynamicFields.
Consider the above example of <dynamicField name="*_demo" type="text_ws" indexed="true" stored="true"/> if I now have <copyField source="id_demo" dest="demographics" /> then I must also have <field name="demographics" type="text_ws" indexed="true" stored="false"/> Now, if I use Solr#, I have to have doc.Add("demographics", "") or it will fail IsValidUpdateIndexDocument. But this is causing the index to be corrupted. Also, this defeats the purpose of copyFields - which is a server side mechanism to aggregate fields. Could we have solr# raise IsValidUpdateIndexDocument = false only if the field has "Isrequired = true"? tia Another possible bug - not sure if this is a bug with Solr# or Solr. To reproduce, create a dynamicField and copyField in schema like this
<dynamicField name="*_demo" type="string" indexed="true" stored="true"/> Now, add TWO fields to match your dynamic field using solr# - for example: doc.Add("id_demo", "lorem") When I add this document to a new Index, I get a corrupted index. > Consider the above example of
<dynamicField name="*_demo" type="text_ws" indexed="true" stored="true"/> > if I now have <copyField source="id_demo" dest="demographics" /> > then I must also have <field name="demographics" type="text_ws" indexed="true" stored="false"/> Let me make sure I understand the scenario here:
I'll test this scenario myself to see what occurs. Jeff
Please let me know if you were able to get this to work. The problem I have is that the the client using Solr# needs to supply a value to the declared field "demographics" - or ti will fail IsValidUpdateIndexDocument. A related problem that I am having is that if you add 2 or more dynamic fields ("id_demo" and "somethingelse_demo") - there is no error message - but, using Luke I see that the document has not been added to the index. TIA Apologies for the delay in the response, occupied with starting a new venture.
First, IsValidUpdateIndexDocument is not a required call to update a solr index. It is intended to be a runtime check for a document's structure, possibly more useful when added an nunit test routine than being called in production. Nonetheless, it should still be applicable in this scenario. On testing with the dynamic field scenario, I've not been able to reproduce the issue. I'm continuing with that to see if I can determine if there's a scenario that solrsharp should be handling vs. an issue with solr.
Jeff Rodenburg made changes - 20/Aug/07 05:08 PM
Added support for highlighting, as outlined in https://issues.apache.org/jira/browse/SOLR-338
Jeff Rodenburg made changes - 22/Aug/07 07:49 AM
Jeff Rodenburg made changes - 22/Aug/07 07:50 AM
Jeff Rodenburg made changes - 30/Aug/07 02:13 PM
Latest release that includes updates for highlighting and debug parameter options
Jeff Rodenburg made changes - 30/Aug/07 02:15 PM
Jeff Rodenburg made changes - 30/Aug/07 02:16 PM
Jeff Rodenburg made changes - 30/Aug/07 02:17 PM
Jeff Rodenburg made changes - 30/Aug/07 02:18 PM
Jeff Rodenburg made changes - 30/Aug/07 02:18 PM
Jeff Rodenburg made changes - 30/Aug/07 02:18 PM
The following small patch (generated with diff, sorry about the format if not appropriate) has the following features:
(Edited to include attachment instead of text block) "diff" output for the above changes
Tomer Gabel made changes - 29/Oct/07 12:29 PM
Great patch, thanks Tomer. I just looked through the patch, here are a few comments:
I'm unsure about the best way to go about freely associating SolrSearcher instances with QueryBuilder instances, outside of configuration control. QueryBuilder implies searchability against a solr server, while the given client configuration may make that server update-only (the SearcherMode property on SolrSearcher.) The idea behind the configuration settings for servers (Read/Write settings) is to ensure updates and queries occur in the right places. At a minimum, there should be a check on the SolrSearcher instance passed to a QueryBuilder constructor that ensures the SearcherMode supports Read. Another matter is encapsulation around the SolrSearcher instance and its query path. Referring to http://wiki.apache.org/solr/SolrRequestHandler My thoughts on this patch: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/src - the source code for the library.
/docs/api - MSDN-style documentation for the library (the MS world equivalent of javadoc).
/example - working examples for the library.
The namespace for the source code is "org.apache.solr.SolrSharp"
Are there any documentation requirements for Apache compliance?
One administrative note: I have a signed agreement on file with the Apache Foundation for code contributions, indemnification of my employer, etc. This is the standard doc that's required for all committers (I have committer status on the Lucene.Net project). I assume this applies for any Apache project.