Re: Minimum Match Query
Hi Atita, We actually looked into that and it does not appear to match based on a single phrase, but says that it must match a certain percentage of the listed phrases. What we need is something that would match based on a single phrase appearing a minimum number of times i.e. "Barker" minimum number of matches =3 where "Barker" showed up in a document 3 or more times. Am I missing something there or am I reading this wrong? The mm (Minimum Should Match) Parameter When processing queries, Lucene/Solr recognizes three types of clauses: mandatory, prohibited, and "optional" (also known as "should" clauses). By default, all words or phrases specified in the q parameter are treated as "optional" clauses unless they are preceded by a "+" or a "-". When dealing with these "optional" clauses, the mm parameter makes it possible to say that a certain minimum number of those clauses must match. The DisMax query parser offers great flexibility in how the minimum number can be specified. We did try doing a query and the results that came back were reflective only of minimum number of phrases matching as opposed to a phrase being mentioned a minimum number of times. For example, If I say query for “Google” with mm=100 it doesn’t find Articles with 100 mentions of Google. It is used for multiple phrase queries. Example against our servers: query = "Barker" OR "Jones" OR “Baker” mm=1 103,896 results query = "Barker" OR "Jones" OR “Baker” mm=2 1200 results query = "Barker" OR "Jones" OR “Baker” mm=3 16 results Please let me know. Thank you, Russ On Wed, May 6, 2020 at 10:13 AM Atita Arora wrote: > Hi, > > Did you happen to look into : > > > https://lucene.apache.org/solr/guide/6_6/the-dismax-query-parser.html#TheDisMaxQueryParser-Themm_MinimumShouldMatch_Parameter > > I believe 6.5.1 has it too. > > I hope it should help. > > > On Wed, May 6, 2020 at 6:46 PM Russell Bahr wrote: > > > Hi SOLR team, > > I have been asked if there is a way to return results only if those > > results match a minimum number of times present in the query. > > ( queries looking for a minimum amount of mentions for a particular > > term/phrase. Ie must be mentioned 'x' amount of times to return results). > > Is this something that is possible using SOLR 6.5.1? Is this something > > that would require a newer version of SOLR? > > Any help on this would be appreciated. > > Thank you, > > Russ > > >
Re: solr core metrics & prometheus exporter - indexreader is closed
Hey Richard, I noticed this issue with the exporter in the 7.x branch. If you look through the release notes for Solr since then there have been quite a few improvements to the exporter particularly around thread safety and concurrency (and the number of nodes it can monitor). The version of the exporter can run independently to your Solr version so my advice would be to download the most recent Solr version, check and modify the exporter start script for its library dependencies, extract these files to a separate location, and run this version against your 7.x instance. If you have the capacity to upgrade your Solr version this will save you having to maintain the exporter separately. Since making this change the exporter has not missed a beat and we monitor around 100 Solr nodes. Good luck, Dwane From: Richard Goodman Sent: Tuesday, 5 May 2020 10:22 PM To: solr-user@lucene.apache.org Subject: solr core metrics & prometheus exporter - indexreader is closed Hi there, I've been playing with the prometheus exporter for solr, and have created my config and have deployed it, so far, all groups were running fine (node, jetty, jvm), however, I'm repeatedly getting an issue with the core group; WARN - 2020-05-05 12:01:24.812; org.apache.solr.prometheus.scraper.Async; Error occurred during metrics collection java.util.concurrent.ExecutionException: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://127.0.0.1:8083/solr: Server Error request: http://127.0.0.1:8083/solr/admin/metrics?group=core&wt=json&version=2.2 at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) ~[?:1.8.0_141] at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895) ~[?:1.8.0_141] at org.apache.solr.prometheus.scraper.Async.lambda$null$1(Async.java:45) ~[solr-prometheus-exporter-7.7.2-SNAPSHOT.jar:7.7.2-SNAPSHOT e5d04ab6a061a02e47f9e6df62a3cfa69632987b - jenkins - 2019-11-22 16:23:03] at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[?:1.8.0_141] at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[?:1.8.0_141] at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) ~[?:1.8.0_141] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:1.8.0_141] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:1.8.0_141] at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[?:1.8.0_141] at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[?:1.8.0_141] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_141] at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[?:1.8.0_141] at org.apache.solr.prometheus.scraper.Async.lambda$waitForAllSuccessfulResponses$3(Async.java:43) ~[solr-prometheus-exporter-7.7.2-SNAPSHOT.jar:7.7.2-SNAPSHOT e5d04ab6a061a02e47f9e6df62a3cfa69632987b - jenkins - 2019-11-22 16:23:03] at java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:870) ~[?:1.8.0_141] at java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:852) ~[?:1.8.0_141] at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) ~[?:1.8.0_141] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1595) ~[?:1.8.0_141] at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:209) ~[solr-solrj-7.7.2-SNAPSHOT.jar:7.7.2-SNAPSHOT e5d04ab6a061a02e47f9e6df62a3cfa69632987b - jenkins - 2019-11-22 16:23:11] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_141] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_141] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_141] Caused by: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://127.0.0.1:8083/solr: Server Error request: http://127.0.0.1:8083/solr/admin/metrics?group=core&wt=json&version=2.2 at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:643) ~[solr-solrj-7.7.2-SNAPSHOT.jar:7.7.2-SNAPSHOT e5d04ab6a061a02e47f9e6df62a3cfa69632987b - jenkins - 2019-11-22 16:23:11] at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:255) ~[solr-solrj-7.7.2-SNAPSHOT.jar:7.7.2-SNAPSHOT e5d04ab6a061a02e47f9e6df62a3cfa69632987b - jenkins - 2019-11-22 16:23:11] at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:244) ~[solr-solrj-7.7.2-SNAPSHOT.jar:7.7.2-SNAPSHOT e5d04ab6a061a02e47f9e6df62a3cfa69632987b - jen
Re: Minimum Match Query
Hi, Did you happen to look into : https://lucene.apache.org/solr/guide/6_6/the-dismax-query-parser.html#TheDisMaxQueryParser-Themm_MinimumShouldMatch_Parameter I believe 6.5.1 has it too. I hope it should help. On Wed, May 6, 2020 at 6:46 PM Russell Bahr wrote: > Hi SOLR team, > I have been asked if there is a way to return results only if those > results match a minimum number of times present in the query. > ( queries looking for a minimum amount of mentions for a particular > term/phrase. Ie must be mentioned 'x' amount of times to return results). > Is this something that is possible using SOLR 6.5.1? Is this something > that would require a newer version of SOLR? > Any help on this would be appreciated. > Thank you, > Russ >
Minimum Match Query
Hi SOLR team, I have been asked if there is a way to return results only if those results match a minimum number of times present in the query. ( queries looking for a minimum amount of mentions for a particular term/phrase. Ie must be mentioned 'x' amount of times to return results). Is this something that is possible using SOLR 6.5.1? Is this something that would require a newer version of SOLR? Any help on this would be appreciated. Thank you, Russ
Integrate highlighting data within main search results
Hi, I am using highlighting feature in solr 8.3 with default method. With current behaviour, main search results and highlighted results are shown in different blocks. Is there a way we can implemented highlighting within the search main results, without having to return extra block for highlighting? I believe that due to performance factor(like default limit values for hl.maxAnalyzedChars, hl.snippets, hl.fragsize) that highlight is returned as separate component. But, if someone has written custom component to integrate both, please share the steps. Also, please share the performance of it. Regards Kamal Kishore