I'm trying to update a specific field in a solr document. For testing purposes I'm using the author field. Afterwards i will try to update the date field. I'm using curl in cygwin terminal. This is the command I'm entering in the terminal:
curl http://localhost:8983/solr/MaharaPortfolioA/update -d '[{"url":"https://www.moopaed.de/mahara/view/view.php?id=6920","author":{"set":"Herbert"}}]'
To check for a success I'm using the following command and getting this response:
$ curl http://localhost:8983/solr/MaharaPortfolioA/get?id="https://www.moopaed.de/mahara/view/view.php?id=6920"
{
"doc":
{
"url":"https://www.moopaed.de/mahara/view/view.php?id=6920",
"portfolio_title":"IT 2 Portfolio - View 2",
"title":"Themenschwerpunkt Informationssysteme - moopaed mahara",
"author":"Herbert",
"indexDate":"2017-04-05T22:04:10Z",
"nrImages":8,
"nrWords":7474,
"nrUploadedImages":6,
"nrLinks":0,
"cohort":"IT3 WS 2013/2014",
"lecture":"OOP",
"nrWikipediaImages":0,
"nrWikipediaLinks":0,
"_version_":1564023239370342400}}
According the response everything seems fine: The vaule of author changed from "Louisa" to "Herbert". But if I'm using a query the search for "Herbert" I get no result (http://localhost:8983/solr/MaharaPortfolioA/select?q=Herbert). On my search for a solution I found different possible reasons for that problem:
- The specific field must be set stored="true". It is set true for author.
- After my update I optimized the core via "optimize" button in solr admin panel.
- I did a commit with: http://localhost:8983/solr/MaharaPortfolioA/update?commit=true . I used this solution: Link
I have no further ideas why my search for "Herbert" gives me no response.
- Is it because my unique key is a url and not an integer value?
- Or is it because I'm using Curl via Cygwin? Furthermore there's a
difference between cURL (Client for URLs) and curl (programming
language). If tutorials use this term, do they refer to cURL? - Another reason could be that "author" gets filtered and tokenized while indexing. Maybe my update doesn't run through these actions?
Thanks in advance