You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Jeff Rodenburg (JIRA)" <ji...@apache.org> on 2007/11/03 20:07:50 UTC

[jira] Commented: (SOLR-205) SolrSharp - a C# client API for Solr

    [ https://issues.apache.org/jira/browse/SOLR-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539966 ] 

Jeff Rodenburg commented on SOLR-205:
-------------------------------------

Great patch, thanks Tomer.  I just looked through the patch, here are a few comments:

- SolrType.cs/TypeExpression(...): replace the if/else lookup scheme for type mappings with a static type Dictionary for lookups.
The typemap lookup is much cleaner than the if/else sequence.  Shorter code, of which I'm a fan.  Nice optimization, thanks.

- QueryBuilder.cs: add public constructors that take a SolrSearcher instance.  There are 6 or 7 constructors, and they would all be extended with an additional SolrSearcher instance.

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, the "select/" path for queries will technically work but also can short-circuit defined handlers already defined on a solr server.  The SolrSearcher instance should respect the server configuration on the solr instance.  This is not currently in place in the solrsharp code, but is something that we should add.  This involves wiring up Request Handlers, which haven't been done yet.

My thoughts on this patch:
1) Apply the change to SolrType.TypeExpression(...)
2) Apply the constructor changes to QueryBuilder, but modify them to incorporate checking on SearcherMode properties in the constructor.
3) Begin evaluation of strongly-typed Request Handlers to control the SolrSearcher Url property.

> SolrSharp - a C# client API for Solr
> ------------------------------------
>
>                 Key: SOLR-205
>                 URL: https://issues.apache.org/jira/browse/SOLR-205
>             Project: Solr
>          Issue Type: New Feature
>          Components: clients - C#
>         Environment: Microsoft Windows, .Net Framework 2.0
>            Reporter: Jeff Rodenburg
>            Assignee: Jeff Rodenburg
>            Priority: Minor
>         Attachments: patch, solrsharp-1.2-08302007.zip
>
>
> SolrSharp is a client API written in C# using the .Net framework to interact with Apache Solr.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.