Thanks Shawn. Steve
On Fri, Jun 12, 2015 at 6:00 PM, Shawn Heisey <apa...@elyograg.org> wrote: > On 6/12/2015 3:30 PM, Steven White wrote: > > Thank you Erik and Shawn for your support. > > > > I'm using Solr's Schema API and Config API to manage and administer a > Solr > > deployment based on customer specific setting that my application will > need > > to do to a Solr deployment. A client application will be using my APIs > and > > as part of data validation, I'm trying to figure out what to allow and > what > > not too as invalid attributes data that I cannot send to Solr. > > > > For example, I wasn't sure that a request-handler name can have spaces or > > can be all numeric, etc. What about fields and field types, is there a > > restriction for the field names? > > > > I know my question is broad, but if there is a starting point, I can use > > that to help me write application so that it is defensive against clients > > who will use it to manage Solr. If they use invalid data, I don't want > to > > send it to Solr and cause Solr to break. > > Even if things like spaces and punctuation are accepted, I wouldn't use > them. You can't be sure that all parts of Solr will support strange > characters, much less third-party software. > > For handler names, they should always start with a forward slash and > stick to letters, numbers, and the underscore, and also make sure you > stick to ASCII characters numbered below 127, even if Solr would allow > you to use other characters. If you stick to that, you can be > reasonably sure everything will work with any software. > > Field and type names should stick to letters, numbers, and the > underscore character, also within the standard ASCII character set. > > I like to use only lowercase letters, but that's not a requirement. > Note that if you do use mixed case, almost everything in Solr is case > sensitive, so you must use the same case everywhere, and you should not > use two names that differ only in the case of the letters, just in case > something is NOT case sensitive. > > I also prefer to start identifiers with a letter, not a number, but I'm > pretty sure that is also not a requirement. > > For best results, similar rules should be followed for other identifiers > in a Solr config/schema. > > Thanks, > Shawn > >