Technically, core Solr does not require a unique key. A lot of features in Solr do require unique keys, and it is recommended that you have unique keys, but it is not an absolute requirement.

-- Jack Krupansky
-----Original Message----- From: Daniel Baughman
Sent: Thursday, May 16, 2013 1:50 PM
To: solr-user@lucene.apache.org
Subject: RE: Deleting an entry from a collection when they key has ":" in it

Thanks for the idea....
http://localhost:8983/solr/docrepo/update/?stream.body=%3Cdelete%3E%3Cquery%
3Ekey%3AD\:\\Webdocs\\sw4\\docRepo\\documents\\Hiring%20Manager\\Disciplinar
y\\asdfasdf\.docx%3C%2Fquery%3E%3C%2Fdelete%3E

I do have :'s and  \'s escaped, I believe.

If in my schema, I have the "key" field set to indexed=false, then is that
maybe the issue?  I'm going to try to set that to true and rebuild the
repository and see if that does it.


-----Original Message-----
From: Jack Krupansky [mailto:j...@basetechnology.com]
Sent: Thursday, May 16, 2013 11:20 AM
To: solr-user@lucene.apache.org
Subject: Re: Deleting an entry from a collection when they key has ":" in it

You need to escape colons in queries, using either a backslash or enclosing
the full query term in quotes.

In your case, you have backslashes as well in your query, which the query
parser will interpret as an escape! So, you need to escape those backslashes
as well:

D\:\\somedir\\somefile.pdf

or

"D:\\somedir\\somefile.pdf"

-- Jack Krupansky

-----Original Message-----
From: Daniel Baughman
Sent: Thursday, May 16, 2013 11:33 AM
To: solr-user@lucene.apache.org
Subject: Deleting an entry from a collection when they key has ":" in it

Hi All,



I seem to be really struggling to delete an entry from  a search repository
that has a ":" in the key.



The key is path to the file ie, "D:\somedir\somefile.pdf".



I want to use a query to delete it and I just can't seem to make it go away.



I've been trying stuff lke this:

http://localhost:8983/solr/docrepo/update/?stream.body=%3Cdelete%3E%3Cquery%
3Ekey%3AD\:\\Webdocs\\sw4\\docRepo\\documents\\Hiring%20Manager\\Disciplinar
y\\asdfasdf\.docx%3C%2Fquery%3E%3C%2Fdelete%3E
<http://localhost:8983/solr/docrepo/update/?stream.body=%3Cdelete%3E%3Cquery
%3Ekey%3AD\:\\Webdocs\\sw4\\docRepo\\documents\\Hiring%20Manager\\Disciplina
ry\\asdfasdf\.docx%3C%2Fquery%3E%3C%2Fdelete%3E&version=2.2&start=0&rows=10&
indent=on> &version=2.2&start=0&rows=10&indent=on



It doesn't throw an error but it doesn't delete the document either.



Does anyone have any suggestions?



Thanks,

Dan

Reply via email to