Solr server up and running. created server in search api and it creates successfully. create index select a couple of fields and get Couldn't index items. Check the logs for details. when I go to index. watchdog says An error occurred while indexing: '400' Status: Bad Request. solr says
127.0.0.1 - - [23/02/2012:20:47:19 +0000] "POST /solr/update?wt=json HTTP/1.0" 400 1438
solr admin showing Solr Admin (drupal-3.0-beta14)....cwd=/home/apache-solr-1.4.0/example SolrHome=solr/
all configs were copied over to solr as per insructions. The index I create is node type but I've tried other types still get message.
solr indexes successfully in Apache Solr search module.
I've been chasing this a couple of days unplugging replugging recreating server and indexes. Any direction would be appreciated.
Comments
Comment #1
thedosmann commentedComment #2
thedosmann commentedfound this in solr log
Feb 23, 2012 9:15:09 PM org.apache.solr.common.SolrException log
SEVERE: org.apache.solr.common.SolrException: Document [test-3] missing required field: entity_type
at org.apache.solr.update.DocumentBuilder.toDocument
I have verified that the schema files are the same as come with module
Could not get past this. I initially installed the Apache Solr search module and got good results. I then wanted to see if this api would give me more options/flex. I unistalled Apache Solr search module and I installed this module following install instructions and replaced the 2 xml files in the solr config that came with this this module. Started getting the error when creating an index. I checked the solr schema browser and saw that the entity_type field was there. I stopped the solr instance deleted the sample solr index directory, verified the 2 xml files were correct and then restarted solr. The field was still there. I may visit this later but for now will work with the Apache Solr search module as it connects and indexes with no issues.
Comment #3
thedosmann commentedComment #4
jthomasbailey commentedI'm getting it too, I thought maybe it was because I was because I was using 3.5 with this solrconfig.txt. Here's the Solr output when I try indexing with Search API Solr:
Comment #5
mitch albert commentedI had the same error. It seems that my schema.xml and solrconfig.xml where not the correct ones.
The ones from the search_api_solr and the solr integration module are not the same schema.xml.
Comment #6
kevinquillen commentedI got this same error. Here is how I fixed it:
1. Copy schema.xml and solrconfig.xml from Search API Solr into /path/to/solr/conf
2. Restart the Solr service
3. Try to Reindex
After I did that (I simply forgot to restart Solr) I was able to index without 400 error.
Comment #7
drunken monkeyAs #5 and #6 state, you seem to use the wrong schema.xml (and probably solrconfig.xml, too). Please use the ones provided with the module and, if this solves the problem, mark this issue as "fixed".
Comment #8
thedosmann commentedI couldn't get past this. I replaced and verified the xml files. It is possiable that my issue was connected to my solr install as I had some issues with getting it to run as a service on my flavour of linux. Can't verify because I switched to working with Ajax solr and was able to get it working on drupal 7 as I needed (date, auto-complete, content, etc widgets in a drilldown facets search on several forums, groups, tags etc.). I'll change to fixed but I can't verify my issue because I gave up the ghost after several weeks into this. I can verify I unistalled solr twice and reinstalled and did the same with Search API and verified the xmls were correct but I must add that my solr was not running as a service and it's likely some cacheing was going on serverside or perhaps something else???
Comment #10
ymakux commentedOh, man, you made my day. I had another issue - documents never sent to Apache Solr. Using Xampp with Tomcat on Win XP. The above fixed my problem. Thanks!
Comment #11
soul88Have the same error, but for different reason.
Solr search works fine. But when I enable indexing of hierarchical structures (taxonomies) and then try to re-index my content - I get the error described above.
Having spent some time with debugger I found out that Solr actually replies the following info to Drupal:
This happens only if I check to index parent elements on the "Workflow" tab. How can this be fixed?
Comment #12
soul88Comment #13
kenorb commentedThe same problem with rc2.
Content generated by devel_generate, the field is just Text field. Tried to clear the index, restarting solr, didn't help much.
This happens only when field has 'String' type, it does work when it has 'Fulltext'.
Field settings: /admin/config/search/search_api/index/job_search/fields
Error:
Comment #14
kenorb commentedThis issue is mix of different separate issues, so I'm closing it.
Problem with:
multiple values encountered for non multiValued field
is reported here:
#1909496: Tokenizer: multiple values encountered for non multiValued when field type is String
Problem with:
'400' Status: Bad Request
If you have error:
An error occurred while indexing: '400' Status: Bad RequestPlease make sure that you have all schema files in place and you read the installation instructions.
Most of the problems are caused by mis-configuration of solr server (copied wrong schema files).
If you think this is the bug, please report it separately with some more details.
If you've 400 using Acquia Network (search_api_acquia module), please check this issue:
#1751662: Couldn't index items. Check the logs for details.
Comment #16
aryashreep commented#10 Worked for me.