lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandre Rafalovitch <arafa...@gmail.com>
Subject Re: Delete by query using JSON?
Date Wed, 23 Mar 2016 14:20:16 GMT
Ouch! I certainly did not mean to sound snippy. But perhaps it did, at
least to some people. I'll try to be even more PC in the future.

I am glad the problem was resolved in the end.
----
Newsletter and resources for Solr beginners and intermediates:
http://www.solr-start.com/


On 23 March 2016 at 10:16, Robert Brown <rob@intelcompute.com> wrote:
> "why do you care? just do this ..."
>
> I see this a lot on mailing lists these days, it's usually a learning
> curve/task/question.  I know I fall into these types of questions/tasks
> regularly.
>
> Which usually leads to "don't tell me my approach is wrong, just explain
> what's going on, and why", or "just answer the straight-forward question I
> asked in first place.".
>
> Sorry for rambling, this just sounded familiar...
>
> :)
>
>
>
>
> On 22/03/16 22:50, Alexandre Rafalovitch wrote:
>>
>> Why do you care?
>>
>> The difference between Q and FQ are the scoring. For delete, you
>> delete all of them regardless of scoring and there is no difference.
>> Just chuck them all into Q.
>>
>> Regards,
>>     Alex.
>> ----
>> Newsletter and resources for Solr beginners and intermediates:
>> http://www.solr-start.com/
>>
>>
>> On 23 March 2016 at 06:07, Paul Hoffman <paul@flo.org> wrote:
>>>
>>> I've been struggling to find the right syntax for deleting by query
>>> using JSON, where the query includes an fq parameter.
>>>
>>> I know how to delete *all* documents, but how would I delete only
>>> documents with field doctype = "cres"?  I have tried the following along
>>> with a number of variations, all to no avail:
>>>
>>> $ curl -s -d @-
>>> 'http://localhost:8983/solr/blacklight-core/update?wt=json' <<EOS
>>> {
>>> "delete": { "query": "doctype:cres" }
>>> }
>>> EOS
>>>
>>> I can identify the documents like this:
>>>
>>> curl -s
>>> 'http://localhost:8983/solr/blacklight-core/select?q=&fq=doctype%3Acres&wt=json&fl=id'
>>>
>>> It seems like such a simple thing, but I haven't found any examples that
>>> use an fq.  Could someone post an example?
>>>
>>> Thanks in advance,
>>>
>>> Paul.
>>>
>>> --
>>> Paul Hoffman <paul@flo.org>
>>> Systems Librarian
>>> Fenway Libraries Online
>>> c/o Wentworth Institute of Technology
>>> 550 Huntington Ave.
>>> Boston, MA 02115
>>> (617) 442-2384 (FLO main number)
>
>

Mime
View raw message