You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by lupiss <lu...@hotmail.com> on 2009/04/21 18:32:39 UTC

Re: Delete from Solr index...

Hola!
¿qué tal?

Tengo un problema parecido, necesito borrar algunos índices de mi solr, ya
que los di de alta mientras hacía pruebas y ahora que entregaré el proyecto
necesito que no aparezcan ya, se me complica esto ya que toda la información
de solr está en inglés y pués yo no lo entiendo bien, en fin, espero me
puedan ayudar ya que tengo solo unos días para entregar el proyecto, de
antemano mil gracias! :)

Hello! 
How are you? 

I have a similar problem, I need to delete some of my SOLR indexes, since
the various tests was as high and now that I need to deliver the project
because they do not show, I compounded this, as all information is in
English and SOLR after I do not understand, finally, I hope I can help
because I have just days to deliver the project, a thousand thanks in
advance! :)
-- 
View this message in context: http://www.nabble.com/Delete-from-Solr-index...-tp10264940p23159879.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Delete from Solr index...

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
Try solrServer.deleteByQuery("id:2354345");

This will delete all documents which have id=2354345.

OR

solrServer.deleteById("2354345");

This works if id is uniqueKey in schema.xml
<uniqueKey>id</uniqueKey>

On Fri, Apr 24, 2009 at 10:43 PM, lupiss <lu...@hotmail.com> wrote:

>
> You can use solrServer.deleteByQuery("*:*") and then call commit by
> solrServer.commit(true, true);
>
> This will erase the index.
>
> --
> Regards,
> Shalin Shekhar Mangar.
>
>
> hola gracias por contestar! ese comando ya lo había visto, pero borra todo
> los índices verdad?, yo quisiera borrar solo un índice de id = 2354345 por
> ejemplo, gracias
>
> hello thank you for answering! that time it had already seen it, but erased
> all the indexes right?, I just delete an index id = 2354345 for example,
> thanks
> --
> View this message in context:
> http://www.nabble.com/Delete-from-Solr-index...-tp10264940p23221035.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>


-- 
Regards,
Shalin Shekhar Mangar.

Re: Delete from Solr index...

Posted by lupiss <lu...@hotmail.com>.
You can use solrServer.deleteByQuery("*:*") and then call commit by
solrServer.commit(true, true);

This will erase the index.

-- 
Regards,
Shalin Shekhar Mangar.


hola gracias por contestar! ese comando ya lo había visto, pero borra todo
los índices verdad?, yo quisiera borrar solo un índice de id = 2354345 por
ejemplo, gracias

hello thank you for answering! that time it had already seen it, but erased
all the indexes right?, I just delete an index id = 2354345 for example,
thanks
-- 
View this message in context: http://www.nabble.com/Delete-from-Solr-index...-tp10264940p23221035.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Delete from Solr index...

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Thu, Apr 23, 2009 at 9:25 AM, lupiss <lu...@hotmail.com> wrote:

>
> hola de nuevo!
> es cierto ese comando es el que borra un index, ya lo intenté y sí, así
> borraré mis registros de prueba de mi proyecto, estaría bien saber como
> borrarlo desde la aplicación mediante solrj, saludos, gracias :)
>
> hello again!
> this is true is the command that erases an index, and I tried and yes, that
> blot on my record of my test project, it would be nice to know how to
> delete
> it from your application using solrj, greetings, thank you:)
>

You can use solrServer.deleteByQuery("*:*") and then call commit by
solrServer.commit(true, true);

This will erase the index.

-- 
Regards,
Shalin Shekhar Mangar.

Re: Delete from Solr index...

Posted by lupiss <lu...@hotmail.com>.
hola de nuevo!
es cierto ese comando es el que borra un index, ya lo intenté y sí, así
borraré mis registros de prueba de mi proyecto, estaría bien saber como
borrarlo desde la aplicación mediante solrj, saludos, gracias :)

hello again! 
this is true is the command that erases an index, and I tried and yes, that
blot on my record of my test project, it would be nice to know how to delete
it from your application using solrj, greetings, thank you:)
-- 
View this message in context: http://www.nabble.com/Delete-from-Solr-index...-tp10264940p23189684.html
Sent from the Solr - User mailing list archive at Nabble.com.