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 Gastone Penzo <ga...@gmail.com> on 2011/03/28 16:12:58 UTC

delete by query

Hi,
i want to use delete by query method to delete indexes.
i try for example:

http://10.0.0.178:8983/solr/update?stream.body=
<delete><query>field1:value</query></delete>

and it works

but how can delete indexes by 2 filters?

http://10.0.0.178:8983/solr/update?stream.body=<delete><query>field1:value1
AND field2:value2</query></delete>

it doesn't work. i need a logic AND cause i want solr delete indexes which
have field1 with value1 and field2 with value2.
is it possible?

thanx


-- 
Gastone Penzo
*www.solr-italia.it*
*The first italian blog about Apache Solr*

Re: delete by query

Posted by Gastone Penzo <ga...@gmail.com>.
i resolved:
http://10.0.0.178:8983/solr/update?stream.body=
<delete><query>(field1:value1)AND(field2:value2)</query></delete>

Thanx

2011/3/28 Gastone Penzo <ga...@gmail.com>

> Hi,
> i want to use delete by query method to delete indexes.
> i try for example:
>
> http://10.0.0.178:8983/solr/update?stream.body=
> <delete><query>field1:value</query></delete>
>
> and it works
>
> but how can delete indexes by 2 filters?
>
> http://10.0.0.178:8983/solr/update?stream.body=<delete><query>field1:value1
> AND field2:value2</query></delete>
>
> it doesn't work. i need a logic AND cause i want solr delete indexes which
> have field1 with value1 and field2 with value2.
> is it possible?
>
> thanx
>
>
> --
> Gastone Penzo
> *www.solr-italia.it*
> *The first italian blog about Apache Solr*
>
>


-- 
Gastone Penzo
*www.solr-italia.it*
*The first italian blog about Apache Solr*