Re: Problems of deleting documents from Solr

2011-05-01 Thread Ahmet Arslan
Hi Jeff,

You canĀ  delete either by unique id or by a query.
It seems that you want to delete all documents having category of monitor.

cat:monitor

http://wiki.apache.org/solr/UpdateXmlMessages#A.22delete.22_by_ID_and_by_Query


- Original Message -
From: Jeff Zhang 
To: solr-user@lucene.apache.org
Cc: 
Sent: Monday, May 2, 2011 5:04 AM
Subject: Problems of deleting documents from Solr

Hi all,

I want to update some document, so first I delete these document by invoking
command "java -Ddata=args -Dcommit=yes -jar post.jar
"monitor"
The result is that I can not search the deleted documents but I can still
see the terms of these document in
http://localhost:8983/solr/admin/schema.jsp
Even when I restart solr, it's still there, I notice that the *numDocs: * 0
while *maxDoc: * 1

Why's that ? How can I delete the documents correctly ?

-- 
Best Regards

Jeff Zhang



Re: Problems of deleting documents from Solr

2011-05-01 Thread Otis Gospodnetic
Hi Jeff,

If you run the optimize command after deletion, all documents marked as deleted 
will be expunged from the index.

Keep in mind that another way to update a document is to just re-add it with 
the 
new values.  If you use uniqueKey (defined in schema.xml), Solr will make sure 
there are no duplicates in the index.

Otis

Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
Lucene ecosystem search :: http://search-lucene.com/



- Original Message 
> From: Jeff Zhang 
> To: solr-user@lucene.apache.org
> Sent: Sun, May 1, 2011 10:04:12 PM
> Subject: Problems of deleting documents from Solr
> 
> Hi all,
> 
> I want to update some document, so first I delete these document  by invoking
> command "java -Ddata=args -Dcommit=yes -jar  post.jar
> "monitor"
> The  result is that I can not search the deleted documents but I can still
> see the  terms of these document in
> http://localhost:8983/solr/admin/schema.jsp
> Even when I restart solr,  it's still there, I notice that the *numDocs: * 0
> while *maxDoc: *  1
> 
> Why's that ? How can I delete the documents correctly ?
> 
> -- 
> Best Regards
> 
> Jeff Zhang
> 


Problems of deleting documents from Solr

2011-05-01 Thread Jeff Zhang
Hi all,

I want to update some document, so first I delete these document by invoking
command "java -Ddata=args -Dcommit=yes -jar post.jar
"monitor"
The result is that I can not search the deleted documents but I can still
see the terms of these document in
http://localhost:8983/solr/admin/schema.jsp
Even when I restart solr, it's still there, I notice that the *numDocs: * 0
while *maxDoc: * 1

Why's that ? How can I delete the documents correctly ?

-- 
Best Regards

Jeff Zhang