RE: json update moves doc to end
of: 4.349904 = idf(docFreq=29, maxDocs=855) 0.0070840283 = queryNorm 0.1359345 = fieldWeight in 0, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 4.349904 = idf(docFreq=29, maxDocs=855) 0.03125 = fieldNorm(doc=0) 0.006139375 = (MATCH) weight(plain_text:berich in 0) [DefaultSimilarity], result of: 0.006139375 = score(doc=0,freq=1.0 = termFreq=1.0 ), product of: 0.037305873 = queryWeight, product of: 5.266195 = idf(docFreq=11, maxDocs=855) 0.0070840283 = queryNorm 0.16456859 = fieldWeight in 0, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 5.266195 = idf(docFreq=11, maxDocs=855) 0.03125 = fieldNorm(doc=0) 0.0059541636 = (MATCH) weight(plain_text:ericht in 0) [DefaultSimilarity], result of: 0.0059541636 = score(doc=0,freq=1.0 = termFreq=1.0 ), product of: 0.036738846 = queryWeight, product of: 5.186152 = idf(docFreq=12, maxDocs=855) 0.0070840283 = queryNorm 0.16206725 = fieldWeight in 0, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 5.186152 = idf(docFreq=12, maxDocs=855) 0.03125 = fieldNorm(doc=0) 0.006139375 = (MATCH) weight(plain_text:bericht in 0) [DefaultSimilarity], result of: 0.006139375 = score(doc=0,freq=1.0 = termFreq=1.0 ), product of: 0.037305873 = queryWeight, product of: 5.266195 = idf(docFreq=11, maxDocs=855) 0.0070840283 = queryNorm 0.16456859 = fieldWeight in 0, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 5.266195 = idf(docFreq=11, maxDocs=855) 0.03125 = fieldNorm(doc=0) 7.054 = (MATCH) weight(editorschoice:bericht^200.0 in 0) [DefaultSimilarity], result of: 7.054 = score(doc=0,freq=1.0 = termFreq=1.0 ), product of: 0.749 = queryWeight, product of: 200.0 = boost 7.0579543 = idf(docFreq=1, maxDocs=855) 7.0840283E-4 = queryNorm 7.0579543 = fieldWeight in 0, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 7.0579543 = idf(docFreq=1, maxDocs=855) 1.0 = fieldNorm(doc=0) 0.0021252085 = (MATCH) product of: 0.004250417 = (MATCH) sum of: 0.004250417 = (MATCH) sum of: 0.004250417 = (MATCH) MatchAllDocsQuery, product of: 0.004250417 = queryNorm 0.5 = coord(1/2) -Infinity = (MATCH) FunctionQuery(log(int(clicks))), product of: -Infinity = log(int(clicks)=0) 8.0 = boost 7.0840283E-4 = queryNorm /str -Original Message- From: Erick Erickson [mailto:erickerick...@gmail.com] Sent: Dienstag, 3. Dezember 2013 20:30 To: solr-user@lucene.apache.org Subject: Re: json update moves doc to end Try adding debug=all and you'll see exactly how docs are scored. Also, it'll show you exactly how your query is parsed. Paste that if it's confused, it'll help figure out what's going wrong. On Tue, Dec 3, 2013 at 1:37 PM, Andreas Owen a...@conx.ch wrote: So isn't it sorted automaticly by relevance (boost value)? If not do should i set it in solrconfig? -Original Message- From: Jonathan Rochkind [mailto:rochk...@jhu.edu] Sent: Dienstag, 3. Dezember 2013 19:07 To: solr-user@lucene.apache.org Subject: Re: json update moves doc to end What order, the order if you supply no explicit sort at all? Solr does not make any guarantees about what order documents will come back in if you do not ask for a sort. In general in Solr/lucene, the only way to update a document is to re-add it as a new document, so that's probably what's going on behind the scenes, and it probably effects the 'default' sort order -- which Solr makes no agreement about anyway, you probably shouldn't even count on it being consistent at all. If you want a consistent sort order, maybe add a field with a timestamp, and ask for results sorted by the timestamp field? And then make sure not to change the timestamp when you do an update that you don't want to change the order? Apologies if I've misunderstood the situation. On 12/3/13 1:00 PM, Andreas Owen wrote: When I search for agenda I get a lot of hits. Now if I update the 2. Result by json-update the doc is moved to the end of the index when I search for it again. The field I change is editorschoice and it never contains the search term agenda so I don't see why it changes the order. Why does it? Part of Solrconfig requesthandler I use: requestHandler name=/select2 class=solr.SearchHandler lst name=defaults str name=echoParamsexplicit/str int name=rows10/int str name=defTypesynonym_edismax/str str name
Re: json update moves doc to end
) 0.0056301123 = (MATCH) weight(plain_text:erich in 0) [DefaultSimilarity], result of: 0.0056301123 = score(doc=0,freq=1.0 = termFreq=1.0 ), product of: 0.035725117 = queryWeight, product of: 5.0430512 = idf(docFreq=14, maxDocs=855) 0.0070840283 = queryNorm 0.15759535 = fieldWeight in 0, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 5.0430512 = idf(docFreq=14, maxDocs=855) 0.03125 = fieldNorm(doc=0) 0.0041888 = (MATCH) weight(plain_text:richt in 0) [DefaultSimilarity], result of: 0.0041888 = score(doc=0,freq=1.0 = termFreq=1.0 ), product of: 0.030814843 = queryWeight, product of: 4.349904 = idf(docFreq=29, maxDocs=855) 0.0070840283 = queryNorm 0.1359345 = fieldWeight in 0, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 4.349904 = idf(docFreq=29, maxDocs=855) 0.03125 = fieldNorm(doc=0) 0.006139375 = (MATCH) weight(plain_text:berich in 0) [DefaultSimilarity], result of: 0.006139375 = score(doc=0,freq=1.0 = termFreq=1.0 ), product of: 0.037305873 = queryWeight, product of: 5.266195 = idf(docFreq=11, maxDocs=855) 0.0070840283 = queryNorm 0.16456859 = fieldWeight in 0, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 5.266195 = idf(docFreq=11, maxDocs=855) 0.03125 = fieldNorm(doc=0) 0.0059541636 = (MATCH) weight(plain_text:ericht in 0) [DefaultSimilarity], result of: 0.0059541636 = score(doc=0,freq=1.0 = termFreq=1.0 ), product of: 0.036738846 = queryWeight, product of: 5.186152 = idf(docFreq=12, maxDocs=855) 0.0070840283 = queryNorm 0.16206725 = fieldWeight in 0, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 5.186152 = idf(docFreq=12, maxDocs=855) 0.03125 = fieldNorm(doc=0) 0.006139375 = (MATCH) weight(plain_text:bericht in 0) [DefaultSimilarity], result of: 0.006139375 = score(doc=0,freq=1.0 = termFreq=1.0 ), product of: 0.037305873 = queryWeight, product of: 5.266195 = idf(docFreq=11, maxDocs=855) 0.0070840283 = queryNorm 0.16456859 = fieldWeight in 0, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 5.266195 = idf(docFreq=11, maxDocs=855) 0.03125 = fieldNorm(doc=0) 7.054 = (MATCH) weight(editorschoice:bericht^200.0 in 0) [DefaultSimilarity], result of: 7.054 = score(doc=0,freq=1.0 = termFreq=1.0 ), product of: 0.749 = queryWeight, product of: 200.0 = boost 7.0579543 = idf(docFreq=1, maxDocs=855) 7.0840283E-4 = queryNorm 7.0579543 = fieldWeight in 0, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 7.0579543 = idf(docFreq=1, maxDocs=855) 1.0 = fieldNorm(doc=0) 0.0021252085 = (MATCH) product of: 0.004250417 = (MATCH) sum of: 0.004250417 = (MATCH) sum of: 0.004250417 = (MATCH) MatchAllDocsQuery, product of: 0.004250417 = queryNorm 0.5 = coord(1/2) -Infinity = (MATCH) FunctionQuery(log(int(clicks))), product of: -Infinity = log(int(clicks)=0) 8.0 = boost 7.0840283E-4 = queryNorm /str -Original Message- From: Erick Erickson [mailto:erickerick...@gmail.com] Sent: Dienstag, 3. Dezember 2013 20:30 To: solr-user@lucene.apache.org Subject: Re: json update moves doc to end Try adding debug=all and you'll see exactly how docs are scored. Also, it'll show you exactly how your query is parsed. Paste that if it's confused, it'll help figure out what's going wrong. On Tue, Dec 3, 2013 at 1:37 PM, Andreas Owen a...@conx.ch wrote: So isn't it sorted automaticly by relevance (boost value)? If not do should i set it in solrconfig? -Original Message- From: Jonathan Rochkind [mailto:rochk...@jhu.edu] Sent: Dienstag, 3. Dezember 2013 19:07 To: solr-user@lucene.apache.org Subject: Re: json update moves doc to end What order, the order if you supply no explicit sort at all? Solr does not make any guarantees about what order documents will come back in if you do not ask for a sort. In general in Solr/lucene, the only way to update a document is to re-add it as a new document, so that's probably what's going on behind the scenes, and it probably effects the 'default' sort order -- which Solr makes no agreement about anyway, you probably shouldn't even count on it being consistent at all. If you want a consistent sort order, maybe add a field with a timestamp, and ask for results sorted
RE: json update moves doc to end
I changed my boost-function log(clickrate)^8 to div(clciks,displays)^8 and it works now. I get the following output from debug 0.0022668892 = (MATCH) FunctionQuery(div(const(2),const(5))), product of: 0.4 = div(const(2),const(5)) 8.0 = boost 7.0840283E-4 = queryNorm Am i undestanding this right, that 0.4 and 8.0 result in 7.084? I'm having trouble undestanding how much i boosted it. As i use NgramFilterFactory i get a lot of hits because of the tokens. Can i make the boost higher if the hole search-term is found and not just part of it? -Original Message- From: Erick Erickson [mailto:erickerick...@gmail.com] Sent: Mittwoch, 4. Dezember 2013 15:07 To: solr-user@lucene.apache.org Subject: Re: json update moves doc to end Well, both have a score of -Infinity. So they're equal and the tiebreaker is the internal Lucene doc ID. Now this is not helpful since the question now is where -Infinity comes from, this looks suspicious: -Infinity = (MATCH) FunctionQuery(log(int(clicks))), product of: -Infinity = log(int(clicks)=0) not much help I know, but Erick On Wed, Dec 4, 2013 at 7:24 AM, Andreas Owen a...@conx.ch wrote: Hi Erick Here are the last 2 results from a search and i am not understanding why the last one with the boost editorschoice^200 isn't at the top. By the way can i also give a substantial boost to results that contain the hole search-request and not just 3 or 4 letters (tokens)? str name=dms:1003 -Infinity = (MATCH) sum of: 0.013719446 = (MATCH) max of: 0.013719446 = (MATCH) sum of: 2.090396E-4 = (MATCH) weight(plain_text:ber in 841) [DefaultSimilarity], result of: 2.090396E-4 = score(doc=841,freq=8.0 = termFreq=8.0 ), product of: 0.009452709 = queryWeight, product of: 1.3343692 = idf(docFreq=611, maxDocs=855) 0.0070840283 = queryNorm 0.022114253 = fieldWeight in 841, product of: 2.828427 = tf(freq=8.0), with freq of: 8.0 = termFreq=8.0 1.3343692 = idf(docFreq=611, maxDocs=855) 0.005859375 = fieldNorm(doc=841) 0.0012402858 = (MATCH) weight(plain_text:eri in 841) [DefaultSimilarity], result of: 0.0012402858 = score(doc=841,freq=9.0 = termFreq=9.0 ), product of: 0.022357063 = queryWeight, product of: 3.1559815 = idf(docFreq=98, maxDocs=855) 0.0070840283 = queryNorm 0.05547624 = fieldWeight in 841, product of: 3.0 = tf(freq=9.0), with freq of: 9.0 = termFreq=9.0 3.1559815 = idf(docFreq=98, maxDocs=855) 0.005859375 = fieldNorm(doc=841) 5.0511415E-4 = (MATCH) weight(plain_text:ric in 841) [DefaultSimilarity], result of: 5.0511415E-4 = score(doc=841,freq=1.0 = termFreq=1.0 ), product of: 0.024712078 = queryWeight, product of: 3.4884217 = idf(docFreq=70, maxDocs=855) 0.0070840283 = queryNorm 0.020439971 = fieldWeight in 841, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 3.4884217 = idf(docFreq=70, maxDocs=855) 0.005859375 = fieldNorm(doc=841) 8.721528E-4 = (MATCH) weight(plain_text:ich in 841) [DefaultSimilarity], result of: 8.721528E-4 = score(doc=841,freq=12.0 = termFreq=12.0 ), product of: 0.017446788 = queryWeight, product of: 2.4628344 = idf(docFreq=197, maxDocs=855) 0.0070840283 = queryNorm 0.049989305 = fieldWeight in 841, product of: 3.4641016 = tf(freq=12.0), with freq of: 12.0 = termFreq=12.0 2.4628344 = idf(docFreq=197, maxDocs=855) 0.005859375 = fieldNorm(doc=841) 7.725705E-4 = (MATCH) weight(plain_text:cht in 841) [DefaultSimilarity], result of: 7.725705E-4 = score(doc=841,freq=4.0 = termFreq=4.0 ), product of: 0.021610687 = queryWeight, product of: 3.050621 = idf(docFreq=109, maxDocs=855) 0.0070840283 = queryNorm 0.035749465 = fieldWeight in 841, product of: 2.0 = tf(freq=4.0), with freq of: 4.0 = termFreq=4.0 3.050621 = idf(docFreq=109, maxDocs=855) 0.005859375 = fieldNorm(doc=841) 0.0010287998 = (MATCH) weight(plain_text:beri in 841) [DefaultSimilarity], result of: 0.0010287998 = score(doc=841,freq=1.0 = termFreq=1.0 ), product of: 0.035267927 = queryWeight, product of: 4.978513 = idf(docFreq=15, maxDocs=855) 0.0070840283 = queryNorm 0.029170973 = fieldWeight in 841, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 4.978513 = idf(docFreq=15, maxDocs=855) 0.005859375 = fieldNorm(doc=841) 0.0010556461 = (MATCH) weight(plain_text:eric in 841) [DefaultSimilarity
Re: json update moves doc to end
: Well, both have a score of -Infinity. So they're equal and : the tiebreaker is the internal Lucene doc ID. : : Now this is not helpful since the question now is where : -Infinity comes from, this looks suspicious: : -Infinity = (MATCH) FunctionQuery(log(int(clicks))), product of: : -Infinity = log(int(clicks)=0) If the score of this doc was not -Infinity before your doc update, and it became -Infinity after your update, and your update did not intentionally change the value of the clicks field to 0 then i suspect what you are seeing is the result of not having all of your fields as stored=true... https://cwiki.apache.org/confluence/display/solr/Updating+Parts+of+Documents /!\ All original source fields must be stored for field modifiers to work correctly, which is the Solr default -Hoss http://www.lucidworks.com/
json update moves doc to end
When I search for agenda I get a lot of hits. Now if I update the 2. Result by json-update the doc is moved to the end of the index when I search for it again. The field I change is editorschoice and it never contains the search term agenda so I dont see why it changes the order. Why does it? Part of Solrconfig requesthandler I use: requestHandler name=/select2 class=solr.SearchHandler lst name=defaults str name=echoParamsexplicit/str int name=rows10/int str name=defTypesynonym_edismax/str str name=synonymstrue/str str name=qfplain_text^10 editorschoice^200 title^20 h_*^14 tags^10 thema^15 inhaltstyp^6 breadcrumb^6 doctype^10 contentmanager^5 links^5 last_modified^5 url^5 /str str name=bq(expiration:[NOW TO *] OR (*:* -expiration:*))^6/str !-- tested: now or newer or empty gets small boost -- str name=bflog(clicks)^8/str !-- tested -- !-- todo: anzahl-links(count urlparse in links query) / häufigkeit von suchbegriff (bf= count in title and text)-- str name=dftext/str str name=fl*,path,score/str str name=wtjson/str str name=q.opAND/str !-- Highlighting defaults -- str name=hlon/str str name=hl.flplain_text,title/str str name=hl.simple.prelt;bgt;/str str name=hl.simple.postlt;/bgt;/str !-- lst name=invariants -- str name=faceton/str str name=facet.mincount1/str str name=facet.field{!ex=inhaltstyp}inhaltstyp/str str name=f.inhaltstyp.facet.sortindex/str str name=facet.field{!ex=doctype}doctype/str str name=f.doctype.facet.sortindex/str str name=facet.field{!ex=thema_f}thema_f/str str name=f.thema_f.facet.sortindex/str str name=facet.field{!ex=author_s}author_s/str str name=f.author_s.facet.sortindex/str str name=facet.field{!ex=sachverstaendiger_s}sachverstaendiger_s/str str name=f.sachverstaendiger_s.facet.sortindex/str str name=facet.field{!ex=veranstaltung}veranstaltung/str str name=f.veranstaltung.facet.sortindex/str str name=facet.date{!ex=last_modified}last_modified/str str name=facet.date.gap+1MONTH/str str name=facet.date.endNOW/MONTH+1MONTH/str str name=facet.date.startNOW/MONTH-36MONTHS/str str name=facet.date.otherafter/str /lst /requestHandler
Re: json update moves doc to end
What order, the order if you supply no explicit sort at all? Solr does not make any guarantees about what order documents will come back in if you do not ask for a sort. In general in Solr/lucene, the only way to update a document is to re-add it as a new document, so that's probably what's going on behind the scenes, and it probably effects the 'default' sort order -- which Solr makes no agreement about anyway, you probably shouldn't even count on it being consistent at all. If you want a consistent sort order, maybe add a field with a timestamp, and ask for results sorted by the timestamp field? And then make sure not to change the timestamp when you do an update that you don't want to change the order? Apologies if I've misunderstood the situation. On 12/3/13 1:00 PM, Andreas Owen wrote: When I search for agenda I get a lot of hits. Now if I update the 2. Result by json-update the doc is moved to the end of the index when I search for it again. The field I change is editorschoice and it never contains the search term agenda so I don't see why it changes the order. Why does it? Part of Solrconfig requesthandler I use: requestHandler name=/select2 class=solr.SearchHandler lst name=defaults str name=echoParamsexplicit/str int name=rows10/int str name=defTypesynonym_edismax/str str name=synonymstrue/str str name=qfplain_text^10 editorschoice^200 title^20 h_*^14 tags^10 thema^15 inhaltstyp^6 breadcrumb^6 doctype^10 contentmanager^5 links^5 last_modified^5 url^5 /str str name=bq(expiration:[NOW TO *] OR (*:* -expiration:*))^6/str !-- tested: now or newer or empty gets small boost -- str name=bflog(clicks)^8/str !-- tested -- !-- todo: anzahl-links(count urlparse in links query) / häufigkeit von suchbegriff (bf= count in title and text)-- str name=dftext/str str name=fl*,path,score/str str name=wtjson/str str name=q.opAND/str !-- Highlighting defaults -- str name=hlon/str str name=hl.flplain_text,title/str str name=hl.simple.prelt;bgt;/str str name=hl.simple.postlt;/bgt;/str !-- lst name=invariants -- str name=faceton/str str name=facet.mincount1/str str name=facet.field{!ex=inhaltstyp}inhaltstyp/str str name=f.inhaltstyp.facet.sortindex/str str name=facet.field{!ex=doctype}doctype/str str name=f.doctype.facet.sortindex/str str name=facet.field{!ex=thema_f}thema_f/str str name=f.thema_f.facet.sortindex/str str name=facet.field{!ex=author_s}author_s/str str name=f.author_s.facet.sortindex/str str name=facet.field{!ex=sachverstaendiger_s}sachverstaendiger_s/str str name=f.sachverstaendiger_s.facet.sortindex/str str name=facet.field{!ex=veranstaltung}veranstaltung/str str name=f.veranstaltung.facet.sortindex/str str name=facet.date{!ex=last_modified}last_modified/str str name=facet.date.gap+1MONTH/str str name=facet.date.endNOW/MONTH+1MONTH/str str name=facet.date.startNOW/MONTH-36MONTHS/str str name=facet.date.otherafter/str /lst /requestHandler
Re: json update moves doc to end
AFAIK If you don't supply or configure a sort parameter, SOLR is sorting by score desc. In that case, you may want to understand (at least view) how each document score is calculated: you can run the query with queryDebug set and see the whole explain This great tool helped me a lot: _http://explain.solr.pl _ Best, Andrea On 12/03/2013 07:00 PM, Andreas Owen wrote: When I search for agenda I get a lot of hits. Now if I update the 2. Result by json-update the doc is moved to the end of the index when I search for it again. The field I change is editorschoice and it never contains the search term agenda so I don't see why it changes the order. Why does it? Part of Solrconfig requesthandler I use: requestHandler name=/select2 class=solr.SearchHandler lst name=defaults str name=echoParamsexplicit/str int name=rows10/int str name=defTypesynonym_edismax/str str name=synonymstrue/str str name=qfplain_text^10 editorschoice^200 title^20 h_*^14 tags^10 thema^15 inhaltstyp^6 breadcrumb^6 doctype^10 contentmanager^5 links^5 last_modified^5 url^5 /str str name=bq(expiration:[NOW TO *] OR (*:* -expiration:*))^6/str !-- tested: now or newer or empty gets small boost -- str name=bflog(clicks)^8/str !-- tested -- !-- todo: anzahl-links(count urlparse in links query) / häufigkeit von suchbegriff (bf= count in title and text)-- str name=dftext/str str name=fl*,path,score/str str name=wtjson/str str name=q.opAND/str !-- Highlighting defaults -- str name=hlon/str str name=hl.flplain_text,title/str str name=hl.simple.prelt;bgt;/str str name=hl.simple.postlt;/bgt;/str !-- lst name=invariants -- str name=faceton/str str name=facet.mincount1/str str name=facet.field{!ex=inhaltstyp}inhaltstyp/str str name=f.inhaltstyp.facet.sortindex/str str name=facet.field{!ex=doctype}doctype/str str name=f.doctype.facet.sortindex/str str name=facet.field{!ex=thema_f}thema_f/str str name=f.thema_f.facet.sortindex/str str name=facet.field{!ex=author_s}author_s/str str name=f.author_s.facet.sortindex/str str name=facet.field{!ex=sachverstaendiger_s}sachverstaendiger_s/str str name=f.sachverstaendiger_s.facet.sortindex/str str name=facet.field{!ex=veranstaltung}veranstaltung/str str name=f.veranstaltung.facet.sortindex/str str name=facet.date{!ex=last_modified}last_modified/str str name=facet.date.gap+1MONTH/str str name=facet.date.endNOW/MONTH+1MONTH/str str name=facet.date.startNOW/MONTH-36MONTHS/str str name=facet.date.otherafter/str /lst /requestHandler
RE: json update moves doc to end
So isn't it sorted automaticly by relevance (boost value)? If not do should i set it in solrconfig? -Original Message- From: Jonathan Rochkind [mailto:rochk...@jhu.edu] Sent: Dienstag, 3. Dezember 2013 19:07 To: solr-user@lucene.apache.org Subject: Re: json update moves doc to end What order, the order if you supply no explicit sort at all? Solr does not make any guarantees about what order documents will come back in if you do not ask for a sort. In general in Solr/lucene, the only way to update a document is to re-add it as a new document, so that's probably what's going on behind the scenes, and it probably effects the 'default' sort order -- which Solr makes no agreement about anyway, you probably shouldn't even count on it being consistent at all. If you want a consistent sort order, maybe add a field with a timestamp, and ask for results sorted by the timestamp field? And then make sure not to change the timestamp when you do an update that you don't want to change the order? Apologies if I've misunderstood the situation. On 12/3/13 1:00 PM, Andreas Owen wrote: When I search for agenda I get a lot of hits. Now if I update the 2. Result by json-update the doc is moved to the end of the index when I search for it again. The field I change is editorschoice and it never contains the search term agenda so I don't see why it changes the order. Why does it? Part of Solrconfig requesthandler I use: requestHandler name=/select2 class=solr.SearchHandler lst name=defaults str name=echoParamsexplicit/str int name=rows10/int str name=defTypesynonym_edismax/str str name=synonymstrue/str str name=qfplain_text^10 editorschoice^200 title^20 h_*^14 tags^10 thema^15 inhaltstyp^6 breadcrumb^6 doctype^10 contentmanager^5 links^5 last_modified^5 url^5 /str str name=bq(expiration:[NOW TO *] OR (*:* -expiration:*))^6/str !-- tested: now or newer or empty gets small boost -- str name=bflog(clicks)^8/str !-- tested -- !-- todo: anzahl-links(count urlparse in links query) / häufigkeit von suchbegriff (bf= count in title and text)-- str name=dftext/str str name=fl*,path,score/str str name=wtjson/str str name=q.opAND/str !-- Highlighting defaults -- str name=hlon/str str name=hl.flplain_text,title/str str name=hl.simple.prelt;bgt;/str str name=hl.simple.postlt;/bgt;/str !-- lst name=invariants -- str name=faceton/str str name=facet.mincount1/str str name=facet.field{!ex=inhaltstyp}inhaltstyp/str str name=f.inhaltstyp.facet.sortindex/str str name=facet.field{!ex=doctype}doctype/str str name=f.doctype.facet.sortindex/str str name=facet.field{!ex=thema_f}thema_f/str str name=f.thema_f.facet.sortindex/str str name=facet.field{!ex=author_s}author_s/str str name=f.author_s.facet.sortindex/str str name=facet.field{!ex=sachverstaendiger_s}sachverstaendiger_s/str str name=f.sachverstaendiger_s.facet.sortindex/str str name=facet.field{!ex=veranstaltung}veranstaltung/str str name=f.veranstaltung.facet.sortindex/str str name=facet.date{!ex=last_modified}last_modified/str str name=facet.date.gap+1MONTH/str str name=facet.date.endNOW/MONTH+1MONTH/str str name=facet.date.startNOW/MONTH-36MONTHS/str str name=facet.date.otherafter/str /lst /requestHandler
Re: json update moves doc to end
Try adding debug=all and you'll see exactly how docs are scored. Also, it'll show you exactly how your query is parsed. Paste that if it's confused, it'll help figure out what's going wrong. On Tue, Dec 3, 2013 at 1:37 PM, Andreas Owen a...@conx.ch wrote: So isn't it sorted automaticly by relevance (boost value)? If not do should i set it in solrconfig? -Original Message- From: Jonathan Rochkind [mailto:rochk...@jhu.edu] Sent: Dienstag, 3. Dezember 2013 19:07 To: solr-user@lucene.apache.org Subject: Re: json update moves doc to end What order, the order if you supply no explicit sort at all? Solr does not make any guarantees about what order documents will come back in if you do not ask for a sort. In general in Solr/lucene, the only way to update a document is to re-add it as a new document, so that's probably what's going on behind the scenes, and it probably effects the 'default' sort order -- which Solr makes no agreement about anyway, you probably shouldn't even count on it being consistent at all. If you want a consistent sort order, maybe add a field with a timestamp, and ask for results sorted by the timestamp field? And then make sure not to change the timestamp when you do an update that you don't want to change the order? Apologies if I've misunderstood the situation. On 12/3/13 1:00 PM, Andreas Owen wrote: When I search for agenda I get a lot of hits. Now if I update the 2. Result by json-update the doc is moved to the end of the index when I search for it again. The field I change is editorschoice and it never contains the search term agenda so I don't see why it changes the order. Why does it? Part of Solrconfig requesthandler I use: requestHandler name=/select2 class=solr.SearchHandler lst name=defaults str name=echoParamsexplicit/str int name=rows10/int str name=defTypesynonym_edismax/str str name=synonymstrue/str str name=qfplain_text^10 editorschoice^200 title^20 h_*^14 tags^10 thema^15 inhaltstyp^6 breadcrumb^6 doctype^10 contentmanager^5 links^5 last_modified^5 url^5 /str str name=bq(expiration:[NOW TO *] OR (*:* -expiration:*))^6/str !-- tested: now or newer or empty gets small boost -- str name=bflog(clicks)^8/str !-- tested -- !-- todo: anzahl-links(count urlparse in links query) / häufigkeit von suchbegriff (bf= count in title and text)-- str name=dftext/str str name=fl*,path,score/str str name=wtjson/str str name=q.opAND/str !-- Highlighting defaults -- str name=hlon/str str name=hl.flplain_text,title/str str name=hl.simple.prelt;bgt;/str str name=hl.simple.postlt;/bgt;/str !-- lst name=invariants -- str name=faceton/str str name=facet.mincount1/str str name=facet.field{!ex=inhaltstyp}inhaltstyp/str str name=f.inhaltstyp.facet.sortindex/str str name=facet.field{!ex=doctype}doctype/str str name=f.doctype.facet.sortindex/str str name=facet.field{!ex=thema_f}thema_f/str str name=f.thema_f.facet.sortindex/str str name=facet.field{!ex=author_s}author_s/str str name=f.author_s.facet.sortindex/str str name=facet.field{!ex=sachverstaendiger_s}sachverstaendiger_s/str str name=f.sachverstaendiger_s.facet.sortindex/str str name=facet.field{!ex=veranstaltung}veranstaltung/str str name=f.veranstaltung.facet.sortindex/str str name=facet.date{!ex=last_modified}last_modified/str str name=facet.date.gap+1MONTH/str str name=facet.date.endNOW/MONTH+1MONTH/str str name=facet.date.startNOW/MONTH-36MONTHS/str str name=facet.date.otherafter/str /lst /requestHandler
Re: json update moves doc to end
By default it sorts by score. If the score is a consistent one, it will order docs as they appear in the index, which effectively means an undefined order. For example a *:* query doesn't have terms that can be used to score, so every doc will get a score if 1. Upayavira On Tue, Dec 3, 2013, at 06:37 PM, Andreas Owen wrote: So isn't it sorted automaticly by relevance (boost value)? If not do should i set it in solrconfig? -Original Message- From: Jonathan Rochkind [mailto:rochk...@jhu.edu] Sent: Dienstag, 3. Dezember 2013 19:07 To: solr-user@lucene.apache.org Subject: Re: json update moves doc to end What order, the order if you supply no explicit sort at all? Solr does not make any guarantees about what order documents will come back in if you do not ask for a sort. In general in Solr/lucene, the only way to update a document is to re-add it as a new document, so that's probably what's going on behind the scenes, and it probably effects the 'default' sort order -- which Solr makes no agreement about anyway, you probably shouldn't even count on it being consistent at all. If you want a consistent sort order, maybe add a field with a timestamp, and ask for results sorted by the timestamp field? And then make sure not to change the timestamp when you do an update that you don't want to change the order? Apologies if I've misunderstood the situation. On 12/3/13 1:00 PM, Andreas Owen wrote: When I search for agenda I get a lot of hits. Now if I update the 2. Result by json-update the doc is moved to the end of the index when I search for it again. The field I change is editorschoice and it never contains the search term agenda so I don't see why it changes the order. Why does it? Part of Solrconfig requesthandler I use: requestHandler name=/select2 class=solr.SearchHandler lst name=defaults str name=echoParamsexplicit/str int name=rows10/int str name=defTypesynonym_edismax/str str name=synonymstrue/str str name=qfplain_text^10 editorschoice^200 title^20 h_*^14 tags^10 thema^15 inhaltstyp^6 breadcrumb^6 doctype^10 contentmanager^5 links^5 last_modified^5 url^5 /str str name=bq(expiration:[NOW TO *] OR (*:* -expiration:*))^6/str !-- tested: now or newer or empty gets small boost -- str name=bflog(clicks)^8/str !-- tested -- !-- todo: anzahl-links(count urlparse in links query) / häufigkeit von suchbegriff (bf= count in title and text)-- str name=dftext/str str name=fl*,path,score/str str name=wtjson/str str name=q.opAND/str !-- Highlighting defaults -- str name=hlon/str str name=hl.flplain_text,title/str str name=hl.simple.prelt;bgt;/str str name=hl.simple.postlt;/bgt;/str !-- lst name=invariants -- str name=faceton/str str name=facet.mincount1/str str name=facet.field{!ex=inhaltstyp}inhaltstyp/str str name=f.inhaltstyp.facet.sortindex/str str name=facet.field{!ex=doctype}doctype/str str name=f.doctype.facet.sortindex/str str name=facet.field{!ex=thema_f}thema_f/str str name=f.thema_f.facet.sortindex/str str name=facet.field{!ex=author_s}author_s/str str name=f.author_s.facet.sortindex/str str name=facet.field{!ex=sachverstaendiger_s}sachverstaendiger_s/str str name=f.sachverstaendiger_s.facet.sortindex/str str name=facet.field{!ex=veranstaltung}veranstaltung/str str name=f.veranstaltung.facet.sortindex/str str name=facet.date{!ex=last_modified}last_modified/str str name=facet.date.gap+1MONTH/str str name=facet.date.endNOW/MONTH+1MONTH/str str name=facet.date.startNOW/MONTH-36MONTHS/str str name=facet.date.otherafter/str /lst