Query construction in custom Solr component plugin
Hi, I have developed a solr component which expands users query and adds additional clauses to the query. For this expansion we are making request to external REST api's. This query expansion logic is mainly in prepare() method. Everything works as expected in standalone mode. When we deploy this plugin in SolrCloud environment each shard is calling external REST api for query expansion. My question is that can we make only one call to external REST api since its the same request sent from each shard to external service. How can we modify our component to make only one call per search request ? -- View this message in context: http://lucene.472066.n3.nabble.com/Query-construction-in-custom-Solr-component-plugin-tp4322403.html Sent from the Solr - User mailing list archive at Nabble.com.
Document Score seen in debug section and in main results section dont match
HI All, Currently I am migrating Solr 6.4.2 to Solr 7.4. We pass multiple boost queries (multiplicative boost queries, Solr's 'boost' parameter) to Solr with each query. We have migrated all our custom components and solr configurations to Solr 7.4.2 but during verification we have seen different score in debug section which is not matching with the score that we see when we return score field using fl parameter. After spending half of my day analysing issue I found similar issue is already open. Below issue is exactly same as what I am also observing with Solr 7.4. https://issues.apache.org/jira/browse/SOLR-13126 Is there and solution/workaround available for this issue? or going back to Solr 7.2.1 is the only solution - As per comments in above issue (https://issues.apache.org/jira/browse/LUCENE-8099 these changes are not there in 7.2.1) Any help will be appreciated. -- Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Re: Document Score seen in debug section and in main results section dont match
Thanks Erick to answer your question "What is "Y"?" Score that we see in debug section actually looks correct and if we order documents by that score we can get similar ranking of results that we were getting for solr 6.4.2. But With the score field that we get with each record it looks like boost queries are getting ignored (if there is more than one boost parameter to solr, for single boost parameter it works fine, is something broken here regarding multiple boost queries to solr) -- Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Re: Document Score seen in debug section and in main results section dont match
I will try to provide more data about this issue, If you see attached query response , It shows >> In 1st, 2nd document only query matched and boost queries did not match >> In 3rd document boost query matched and total score of 3rd document >> became 400.04 which is higher than 1st and 2nd document. So I am wondering why Solr ignored score which is coming from boost query section? Solr Response : https://gist.github.com/baloo-solr/73add39132c8f3688a20d4f64fe93279 -- Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Re: Document Score seen in debug section and in main results section dont match
Thanks Erick, We will stick to Solr 7.2.1 which works fine with multiple boost queries. -- Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
RE: boost parameter produces garbage hits
To answer your question "Why does the boost parameter return garbage hits with 0 score?" >> Syntax for Solr's query function is query(subquery, default) it returns >> the score for the given subquery, or the default value for documents not >> matching the query. In your case for the documents where query is not >> matched function becomes product(0,1) which returns 0. And since >> output of boost parameter is multiplicative to main query score, you main >> score is also becoming zero. Means if your documents are not matching boost query then their original score is also getting ignored in this case. You can experiment with default value other than zero. -- Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html