First of all, thank you for your help. Now it doesn't show any errors, but somehow score is based on the title and description but not on the geodist. "params":{ "hl":"on", "pt":"54.69738679999999,25.224815300000046", "fl":"score,*,store:[subquery fromIndex=stores]", "store.rows":"1", "fq":"{!join from=site_id to=site_id fromIndex=stores score=max}{!func}geodist()", "store.sort":"geodist() asc", "hl.simple.pre":"</em>", "store.q":"{!terms f=site_id v=$row.site_id}", " store.sfield":"coordinates", "hl.fl":"title description", "group.field": "site_id", "_":"1573559644298", "group":"true", "store.fq":"{!geofilt}", "d ":"100", "{!geofilt}":"", "group.limit":"2", "store.d":"100", "store.pt": "54.69738679999999,25.224815300000046", "store.fl":"*,score", "sort":"score desc", "sfield":"coordinates", "q":"title:\"iphone xr 64gb\"", "group.main": "true", "hl.simple.post":"</em>", "debugQuery":"on"}
Here is debug: "debug":{ "rawquerystring":"title:\"iphone xr 64gb\"", "querystring":"title:\"iphone xr 64gb\"", "parsedquery":"PhraseQuery(title:\"iphon xr 64gb\")", " parsedquery_toString":"title:\"iphon xr 64gb\"", "explain":{ "product: https://www.ideal.lt/iphone/iphone-xr/iphone-xr-64gb-yellow":"\n3.9714882 = weight(title:\"iphon xr 64gb\" in 568) [SchemaSimilarity], result of:\n 3.9714882 = score(freq=1.0), product of:\n 6.8681135 = idf, sum of:\n 1.1837479 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:\n 459 = n, number of documents containing term\n 1500 = N, total number of documents with field\n 3.3156862 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:\n 54 = n, number of documents containing term\n 1500 = N, total number of documents with field\n 2.3686793 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:\n 140 = n, number of documents containing term\n 1500 = N, total number of documents with field\n 0.5782502 = tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from:\n 1.0 = phraseFreq=1.0\n 1.2 = k1, term saturation parameter\n 0.75 = b, length normalization parameter\n 4.0 = dl, length of field\n 8.384666 = avgdl, average length of field\n", "product: https://www.ideal.lt/iphone/iphone-xr/iphone-xr-64gb-white":"\n3.9714882 = weight(title:\"iphon xr 64gb\" in 569) [SchemaSimilarity], result of:\n 3.9714882 = score(freq=1.0), product of:\n 6.8681135 = idf, sum of:\n 1.1837479 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:\n 459 = n, number of documents containing term\n 1500 = N, total number of documents with field\n 3.3156862 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:\n 54 = n, number of documents containing term\n 1500 = N, total number of documents with field\n 2.3686793 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:\n 140 = n, number of documents containing term\n 1500 = N, total number of documents with field\n 0.5782502 = tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from:\n 1.0 = phraseFreq=1.0\n 1.2 = k1, term saturation parameter\n 0.75 = b, length normalization parameter\n 4.0 = dl, length of field\n 8.384666 = avgdl, average length of field\n", "product: https://istore.lt/iphone-xr-64gb-blue.html":"\n3.9714882 = weight(title:\"iphon xr 64gb\" in 28) [SchemaSimilarity], result of:\n 3.9714882 = score(freq=1.0), product of:\n 6.8681135 = idf, sum of:\n 1.1837479 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:\n 459 = n, number of documents containing term\n 1500 = N, total number of documents with field\n 3.3156862 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:\n 54 = n, number of documents containing term\n 1500 = N, total number of documents with field\n 2.3686793 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:\n 140 = n, number of documents containing term\n 1500 = N, total number of documents with field\n 0.5782502 = tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from:\n 1.0 = phraseFreq=1.0\n 1.2 = k1, term saturation parameter\n 0.75 = b, length normalization parameter\n 4.0 = dl, length of field\n 8.384666 = avgdl, average length of field\n", "product: https://istore.lt/iphone-xr-64gb-coral.html":"\n3.9714882 = weight(title:\"iphon xr 64gb\" in 29) [SchemaSimilarity], result of:\n 3.9714882 = score(freq=1.0), product of:\n 6.8681135 = idf, sum of:\n 1.1837479 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:\n 459 = n, number of documents containing term\n 1500 = N, total number of documents with field\n 3.3156862 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:\n 54 = n, number of documents containing term\n 1500 = N, total number of documents with field\n 2.3686793 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:\n 140 = n, number of documents containing term\n 1500 = N, total number of documents with field\n 0.5782502 = tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from:\n 1.0 = phraseFreq=1.0\n 1.2 = k1, term saturation parameter\n 0.75 = b, length normalization parameter\n 4.0 = dl, length of field\n 8.384666 = avgdl, average length of field\n"}, "QParser":"LuceneQParser", "filter_queries":["{!join from=site_id to=site_id fromIndex=stores score=max}{!func}geodist()"], " parsed_filter_queries":["OtherCoreJoinQuery(OtherCoreJoinQuery [fromIndex=stores, fromCoreOpenTime=3373417389901342 extends SameCoreJoinQuery [fromQuery=ShapeFieldCacheDistanceValueSource(org.apache.lucene.spatial.prefix.PointPrefixTreeFieldCacheProvider@2bfc8ad8, Pt(x=25.224815300000046,y=54.69738679999999)), fromField=site_id, toField=site_id, scoreMode=Max]])"], } On Tue, Nov 12, 2019 at 12:48 PM Mikhail Khludnev <m...@apache.org> wrote: > Hello, > It seems like I breached the limit on unconscious replies in mailing list > I'd rather start with this: > q={!join from=site_id to=site_id fromIndex=stores > score=max}+{!geofilt} > > {!func}geodist()&sfield=coordinates&pt=54.69738679999999,25.224815300000046&d=10 > > > On Mon, Nov 11, 2019 at 11:11 PM Mikhail Khludnev <m...@apache.org> wrote: > > > Is it something like https://issues.apache.org/jira/browse/SOLR-10673 ? > > > > On Mon, Nov 11, 2019 at 3:47 PM Vasily Ogar <ogar.vas...@gmail.com> > wrote: > > > >> it's show nothing because I got an error > >> "metadata":[ "error-class","org.apache.solr.common.SolrException", > >> "root-error-class","org.apache.solr.search.SyntaxError"], > >> "msg":"org.apache.solr.search.SyntaxError: > >> geodist - not enough parameters:[]", > >> > >> If I set parameters then I got another error > >> "metadata":[ "error-class","org.apache.solr.common.SolrException", > >> "root-error-class","org.apache.solr.common.SolrException"], "msg":"A > >> ValueSource isn't directly available from this field. Instead try a > query > >> using the distance as the score.", > >> > >> On Mon, Nov 11, 2019 at 1:36 PM Mikhail Khludnev <m...@apache.org> > wrote: > >> > >> > Hello, Vasily. > >> > Why not? What have you got in debugQuery=true? > >> > > >> > On Mon, Nov 11, 2019 at 1:19 PM Vasily Ogar <ogar.vas...@gmail.com> > >> wrote: > >> > > >> > > Hello, > >> > > Is it possible to sort by score in join by geodist()? For instance, > >> > > something like this > >> > > q={!join from=site_id to=site_id fromIndex=stores score=max} > >> > > +{!func}gedist() +{!geofilt sfield=coordinates > >> > > pt=54.69738679999999,25.224815300000046 d=10} > >> > > sort=score desc > >> > > Thank you > >> > > > >> > > >> > > >> > -- > >> > Sincerely yours > >> > Mikhail Khludnev > >> > > >> > > > > > > -- > > Sincerely yours > > Mikhail Khludnev > > > > > -- > Sincerely yours > Mikhail Khludnev >