I've just installed Solr and I got the default schema working with me.
But when I change the schema from the default to simplier one, I
cannot connect through solr through php but can through tomcat still.
My php code looks like this:
require_once 'Apache/Solr/Service.php';
$solr = new Apache_Solr_Service(
'xxx.xx.xxx.xxx',
8080,
'/
dev.example.com/');
if(!$solr->ping()){
echo 'Solr Down';
}
And my schema in solr
<?xml version="1.0" ?>
<schema name="testschema1" version="1.5">
<types>
<fieldtype name="string" class="solr.StrField"
sortMissingLast="true" omitNorms="true"/>
</types>
<fields>
<!-- general -->
<field name="id" type="string" indexed="true" stored="true"
multiValued="false" required="true"/>
<field name="type" type="string" indexed="true" stored="true"
multiValued="false" />
<field name="name" type="string" indexed="true" stored="true"
multiValued="false" />
<field name="core0" type="string" indexed="true" stored="true"
multiValued="false" />
</fields>
<!-- field to use to determine and enforce document uniqueness. -->
<uniqueKey>id</uniqueKey>
<!-- field for the QueryParser to use when an explicit fieldname is
absent -->
<defaultSearchField>name</defaultSearchField>
<!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
<solrQueryParser defaultOperator="OR"/>
</schema>
Also I get this error when I use java -jar start.jr
SEVERE: org.apache.solr.common.SolrException: undefined field text
at
org.apache.solr.schema.IndexSchema.getDynamicFieldType(IndexSchema.java:
1330)
at org.apache.solr.schema.IndexSchema
$SolrQueryAnalyzer.getAnalyzer(IndexSchema.java:408)
Just to clarify, it only does not connect from PHP when I change the
schema to the one above, the default schema provided by solr works. Am
I missing some required option?