: I get what looks like the admin page, but it says that there are solr core
: initialization failures, and the links on the page just bring me back to the
: same page.

if you get an error on the admin UI, there should be specifics about 
*what* the initialization failure is -- at last one sentence, and there 
should be a full stack trace in the logs -- having those details will 
help understand the root of your first problem, which may explain your 
second problem.

it would also help to know what the CoreAdmin handler returns when you ask 
it for status about all the cores -- even if the *UI* is having problems 
on your browser, that should return useful info (like: how many cores you 
have -- if any -- and which one had an init failure)

https://cwiki.apache.org/confluence/display/solr/CoreAdminHandler+Parameters+and+Usage#CoreAdminHandlerParametersandUsage-{{STATUS}}

: Second, when I try to put a doc in the index using the PHP Pecl Solr package
: from a page on my site, I get errors that indicate that Solr can't see my
: schema.xml file, since Solr doesn't recognize some of the fields that I've
: defined. I have my updated schema.xml file in /etc/solr/collection1/conf/

that doesn't make sense -- if solr can't see your schema.xml file at all, 
you wouldn't get an error about the fields you definied being missing -- 
you'd get an error about the collection you are talking to not existin,g 
because if your schema.xml file can't be found (or has a problem loading) 
the entire SolrCore won't load.

: <str name="msg">ERROR: [doc=334455] unknown field 'brand'</str> <int
: name="code">400</int> </lst> </response> ' in XXXXX:
: SolrClient->addDocument(Object(SolrInputDocument)) #1 {main} thrown in XXXXXX

that error indicates that your solr client sent a document to some (valid 
and functioning) SolrCore which has a schema.xml that does not contain a
field named "brand".

: And this is the relevant section of my schema.xml
: 
:    <field name="brand" type="int" indexed="false" stored="true"
: required="true"/>

my best guess: you have multiple core defined in your solr setup -- one of 
which is working, and is what your client is trying to talk to, but which 
doesn't have the schema.xml that you put your domain specific fields in 
(maybe it's just the default example configs?) and you have another core 
defined, using your customized configs, which failed to load properly.

you mentioned that you did in fact put your configs in "collection1" dir, 
but w/o the specifics of what your solr home dir structure looks like, and 
the specifics of your error message, and details about the URLs your 
client tried to talk to when it got that error, etc....  it's all just 
guesswork on our parts.

http://wiki.apache.org/solr/UsingMailingLists

: So my question is: do I actually need to create a solr.xml file, and all the
: accompanying files that go into specifying a core? (I'm not sure if there are,
: but from some of the documentation it seems like there may be.) Or am I
: pursuing an unnecessary solution to these problems, and there's a simpler fix?

the short answer of your specific question is "no", you don't *have* to 
have a solr.xml (at least not in Solr 4.x) but it's a really good idea, 
even if you only want a single core, because it gives you a way to be 
explicit about what you want and be sure it's what you are getting.


-Hoss

Reply via email to