Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Trying to clean the index:
Apache_Solr_HttpTransportException: '400' Status: Bad Request em Apache_Solr_Service->_sendRawPost() (linha 364 de /home/mercado/public_html/sites/all/libraries/SolrPhpClient/Apache/Solr/Service.php
Trying to index itens:
Couldn't index items. Check the logs for details.
Log Says:
An error occurred while indexing: '400' Status: Bad Request.
Im using the latest release for apache solr and solrPHPclient. Everything seens ok, the module checks the solr server...
Thanks in advance, nice module.
Comments
Comment #1
hodlersho CreditAttribution: hodlersho commentedupdate: There is no log file in my path/to/solr/example/logs
hellllppp!!
Comment #2
jthomasbailey CreditAttribution: jthomasbailey commentedI'm getting this too after switching to a multicore setup
Comment #3
dcoulombe CreditAttribution: dcoulombe commentedSame issue here, used 7.x-1.x-dev and solved my problem.
Comment #4
stephanbauer CreditAttribution: stephanbauer commentedHad a 400 Bad Request when trying to index after I changed the node title to be indexed as string instead of fulltext. Changing back to fulltext fixed it, but this means I can't sort by title.
Comment #5
webavant CreditAttribution: webavant commentedSame thing happened for me. Can't index as a string any more. Tomcat error:
Comment #6
webavant CreditAttribution: webavant commentedI set the field in question in the field UI to be a longtext field, and it indexed as a string, no more error. Don't think that would work for a title, though.
Comment #7
Aeternum CreditAttribution: Aeternum commentedSame problem here. Reverting Title to fulltext made it go away - but that means no more sorting on title.
Comment #8
mwesthof CreditAttribution: mwesthof commentedHad the same problem with usernames being indexed as Fulltext and thus not being able to sort by username in Views.
Changing Fulltext to String would give the "An error occurred while indexing: '400' Status: Bad Request." error.
This doesn't solve the problem, but offers a work-a-round:
After the above steps indexing works again and I was able the sort by "Username (sortable)" in Views and Search on "Name".
This might also work for a title field.
Comment #9
moonshdw8 CreditAttribution: moonshdw8 commentedSame issue. I widdled everything down to just one field, Node ID, and I was still unable to index. Same 400 error.
*-------- Follow Up ----------*
Sorry. My issue looks like it was unrelated to this. I was trying to point my Solr Index to a Server that was already in use. Once I pointed it at the correct core, I was fine.
Comment #10
mvc@mwesthof: thanks for the advice. i tried this with the title field, but the new aggregated field is blank so it doesn't work.
(actually, i'm using the title module to make title a field, but this error happened when i tried including the new title field or the actual title.)
anyone have this working with titles?
Comment #11
mvcsame problem exists in 7.x-1.x-dev (7.x-1.0-rc2+14-dev, 2012-12-15) with both solr 1.4 and 3.6.0.
i couldn't get this working with an aggregated field for node titles, node title fields (title.module), or user names.
Comment #12
pimok3000 CreditAttribution: pimok3000 commentedsame issue here, none of the described fixes worked for me
when i go to
admin/config/search/apachesolr
i can send the remaining items to the solr server through the "Index All" button.
The Drupal logs under
admin/reports/dblog tells me
Apache Solr 22.01.2013 - 12:07 Indexing succeeded on 15 documents
-----------------------
when i go to
admin/config/search/search_api/index/node_search/status
i can NOT index the remaining items to the solr server through the "Index Now" button. The Drupal logs under
admin/reports/dblog tells me
Apache_Solr_HttpTransportException while indexing: '400' Status: Bad Request in Apache_Solr_Service->_sendRawPost() (line 364 of /mysite/libraries/SolrPhpClient/Apache/Solr/Service.php).
In this file we find:
So trying to comment out this whole function gives me a Status Code 500 Error. Same when changing !=200 to =200 or =400 or =0.
Commenting out
gives back the 400 Status Error.
As i am no programmer my search for a solution ends here. Maybe someone can go further?
Comment #13
kenorb CreditAttribution: kenorb commentedRelated or duplicate:
#1844250: Broken Solr 1.4 compatibility results with error: The Solr server could not be reached.
If you're using Acquia Network, please follow this issue: #1751662: Couldn't index items. Check the logs for details.
Usually this error is caused by misconfiguration of Solr instance. Make sure that your Solr instance is using the right files (schema.xml, solrconfig.xml, solrcore.properties, protwords.txt) from your recent Search API Solr module.
Comment #14
pimok3000 CreditAttribution: pimok3000 commentedYeah, you are right, after updating solr to 3.6.3 this problem is gone.
Comment #15
svouthi CreditAttribution: svouthi commentedThank you, kenorb - adding solrcore.properties was key for me. I'd requested that my hosting company set up solr using the Apache Solr Integration module files. However, I then received the 400 error, so I switched to the schema.xml and solrconfig.xml files from the Search API Solr module. After the switch I was able to index at admin/config/search/apachesolr, but not at admin/config/search/search_api/index/%/status. After the addition of solrcore.properties from Search API Solr module, all works well.
Comment #16
Soul88It also turns out that trying to index multivalued field about which solr thinks it has a single value - may cause same error. This may happen if you added a field to the index, indexed the site and after that - allowed this same field to have multiple values. Indexing will die trying to process such entity.
To fix the problem:
1. Delete multivalued field from the list
2. re-index the site
3. Add this field back to the index
4. re-index the site again
voila, you're done.
http://drupal.org/node/1272816 - in some cases this issue is about the same thin with only difference
this error is returned by solr
and this one
can be seen in dblog. And the actual reason for this error was timeout of the connection (60sec) at least in my case.
Comment #17
kenorb CreditAttribution: kenorb commentedMarking this as fixed, because error 400 is too general.
If you still having this, check the solutions described above, otherwise raise the new support ticket describing your problem.
Normally solr gives you the proper explanation in the logging file (or foreground) behind this error.