curl - Solr not showing updated documents -
i'm trying update specific field in solr document. testing purposes i'm using author field. afterwards try update date field. i'm using curl in cygwin terminal. command i'm entering in 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 success i'm using following command , getting 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 response seems fine: vaule of author changed "louisa" "herbert". if i'm using query search "herbert" no result (http://localhost:8983/solr/maharaportfolioa/select?q=herbert). on search solution found different possible reasons problem:
- the specific field must set stored="true". set true author.
- after update optimized core via "optimize" button in solr admin panel.
- i did commit with: http://localhost:8983/solr/maharaportfolioa/update?commit=true . used solution: link
i have no further ideas why search "herbert" gives me no response.
- is because unique key url , not integer value?
- or because i'm using curl via cygwin? furthermore there's difference between curl (client urls) , curl (programming
language). if tutorials use term, refer curl? - another reason "author" gets filtered , tokenized while indexing. maybe update doesn't run through these actions?
thanks in advance
you're not searching author field: q=author:herbert
standard lucene syntax querying author. when you're using q=herbert
, search goes default search field, isn't author (but text
).
if you're using edismax
or dismax
query parsers, can use qf=author text
search both text
, author
field, , can use qf=author^5 text
give more relevancy weight hits in author
field.
the default configuration of text
field not stored="true"
, discard actual content (and keep indexed terms searching).
if you're indexing content using extractingrequesthandler / apache tika / solr cell, content added in field called content
. if field doesn't exist, content dropped.
tika adds extracted text content field.
you can use fmap.content=<fieldname>
map content different field name.
Comments
Post a Comment