delete Problem..

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

delete Problem..

Jörg Agatz
Hallo Users...

I have a Problem, to delete some indext Item

i Tryed it with :

java -Ddata=args -jar
/home/service/solr/apache-solr-nightly/example/exampledocs/post.jar
"<delete><query>EMAIL_HEADER_FROM:test.de</query></delete>"

but Nothing,

EMAIL_HEADER_FROM is a "String"
and in the past it ever works. but now?
I cant delete it.

i can delete some mail when i tryed to delet only one like This:

java -Ddata=args -jar
/home/service/solr/apache-solr-nightly/example/exampledocs/post.jar
"<delete><query>[hidden email].20100803133543</query></delete>"
Reply | Threaded
Open this post in threaded view
|

Re: delete Problem..

Jan Høydahl / Cominvent
Hi,

Since EMAIL_HEADER_FROM is a String type, you need to specify the whole field every time. Wildcards could also work, but you'll get a problem with leading wildcards.

The solution would be to change the fieldType into a "text" type using e.g. StandardTokenizerFactory - if this does not break other functionality you need on that field. Then it would support searching part of the field. You should make this as a phrase search to avoid ambiguities.

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Training in Europe - www.solrtraining.com

On 10. aug. 2010, at 12.29, Jörg Agatz wrote:

> Hallo Users...
>
> I have a Problem, to delete some indext Item
>
> i Tryed it with :
>
> java -Ddata=args -jar
> /home/service/solr/apache-solr-nightly/example/exampledocs/post.jar
> "<delete><query>EMAIL_HEADER_FROM:test.de</query></delete>"
>
> but Nothing,
>
> EMAIL_HEADER_FROM is a "String"
> and in the past it ever works. but now?
> I cant delete it.
>
> i can delete some mail when i tryed to delet only one like This:
>
> java -Ddata=args -jar
> /home/service/solr/apache-solr-nightly/example/exampledocs/post.jar
> "<delete><query>[hidden email].20100803133543</query></delete>"

Reply | Threaded
Open this post in threaded view
|

Re: delete Problem..

kenf_nc
In reply to this post by Jörg Agatz
I'd try 2 things.
First do a query
   q=EMAIL_HEADER_FROM:test.de
and make sure some documents are found. If nothing is found, there is nothing to delete.

Second, how are you testing to see if the document is deleted? The physical data isn't removed from the index until you Optimize I believe. Is it possible your delete is working, but your method of verifying isn't telling you it's marked for deletion?
Reply | Threaded
Open this post in threaded view
|

Re: delete Problem..

Moazzam Khan
Are you running a commit command after every delete command? I had the
same problem with updates. I wasn't committing my updates.

- Moazzam Khan
http://moazzam-khan.com

On Tue, Aug 10, 2010 at 8:52 AM, kenf_nc <[hidden email]> wrote:

>
> I'd try 2 things.
> First do a query
>   q=EMAIL_HEADER_FROM:test.de
> and make sure some documents are found. If nothing is found, there is
> nothing to delete.
>
> Second, how are you testing to see if the document is deleted? The physical
> data isn't removed from the index until you Optimize I believe. Is it
> possible your delete is working, but your method of verifying isn't telling
> you it's marked for deletion?
> --
> View this message in context: http://lucene.472066.n3.nabble.com/delete-Problem-tp1070347p1072581.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>