I'm trying to delete documents on my solr server, but it doesn't work and I get no error.
I tried deleting via browser, curl and solrj and nothing works.
(browser and curl as explained here: Solr delete not working for some reason)
My solrj code is:
server.deleteByQuery("*:*");
server.deleteById("*");
server.deleteById("guid:*");
server.commit(true, true);
UpdateRequest update = new UpdateRequest();
update.deleteByQuery("*:*");
update.setCommitWithin(0);
server.request(update);
server.commit(true, true);
SolrQuery query = new SolrQuery("*:*");//Search for everything/anything
query.setRows(10);
query.setRequestHandler("/query");
QueryResponse qr = server.query(query);
SolrDocumentList result = qr.getResults();
for (SolrDocument doc : result) {
Object id = doc.get("link");
String names = (String) doc.get("description");
System.out.println(id + " " + names);
}
I always get results after executing this, or via the web interface, nothing changes (adding documents works by the way).
Anyone has and idea what I can try or what could be the reason for this?
UPDATE:
So I tried to setup everything from scratch again and I localized the error source: solr doesn't delete documents with my Schema.xml file, I still don't know why though: schema.xml on pastebin