Bad signature in 6.2.0?
Hi, Today I downloaded Solr 6.2.0 from apache.org along with the keys and MD5 ~# wget http://www-us.apache.org/dist/lucene/solr/6.2.0/KEYS ~# wget http://www-us.apache.org/dist/lucene/solr/6.2.0/solr-6.2.0.zip.asc ~# wget http://www-us.apache.org/dist/lucene/solr/6.2.0/solr-6.2.0.tgz ~# wget http://www-us.apache.org/dist/lucene/solr/6.2.0/solr-6.2.0.zip.md5 I imported the keys and attempted to verify... ~# gpg --import KEYS ~# gpg --verify solr-6.2.0.zip.asc solr-6.2.0.tgz But got the following error... gpg: Signature made Sat 20 Aug 2016 21:42:56 NZST using DSA key ID 6E68DA61 gpg: BAD signature from "Michael McCandless (CODE SIGNING KEY) I have downloaded again from another machine with the same result. Is there a problem with the signing of this package? I am hesitant to install it on our servers in this state. Regards, Malcolm. [UNCLASSIFIED] -- CONFIDENTIALITY NOTICE The information in this email is confidential to the Treasury, intended only for the addressee(s), and may also be legally privileged. If you are not an intended addressee: a. please immediately delete this email and notify the Treasury by return email or telephone (64 4 472 2733); b. any use, dissemination or copying of this email is strictly prohibited and may be unlawful.
How to get infix match suggestions in solr
Hi, Solr suggester is giving prefix suggestions in default. How to get infix matched suggestions? I am using AnylyzingInfixSuggestFactory. I don't know how to configure the Schema.xml & Solrconfig.xml. Can anyone help me. Thanks and Regards M Pradeep Chandra
Do delta import will loss some documents, when the documents added in the duration of delta import.
hello guys, I met a problem when i using the solrcloud mode. When the solr instance run delta-import, it may take some time to be finished( my data source is mysql database). So during this time, the new added documents will loss, the deltaQuery, i use SUBDATE(${dih.last_index_time}, INTERVAL 2 MINUTE), let it run the delta-import 2 mins earlier than the last_index_time, if the delta-import's duration is 5 mins, it will loss the records at the first 3 mins. Our servers doesn't use solr cloud mode before, we deal with this issue is trying to rewrite dataimport.properties file, query the max(sys_time_stamp), which will help to record the max time stamp, and let the solr can run delta import standing by the time found in the file, of course, it will never miss documents. But now, we use solrcloud, the dataimport.properties is on the zookeeper, and we may have multiple collections for the same core.how can i update the dataimport.properties file now in collection now? Do you have any solution to help record the max(sys_time_stamp) in dataimport.properties, rather than using the time of delta-import start to run? Appreciate for any suggestions. Thank you !!! Cheers -- Mintel Group Ltd | London | Chicago | New York | Sydney | Shanghai | Tokyo | Mumbai | Singapore | Kuala Lumpur | Sao Paulo | Belfast Contact details for our offices can be found at http://www.mintel.com/office-locations. This email and any attachments may include content that is confidential, privileged, or otherwise protected under applicable law. Unauthorised disclosure, copying, distribution, or use of the contents is prohibited and may be unlawful. If you have received this email in error, including without appropriate authorisation, then please reply to the sender about the error and delete this email and any attachments.
Re: How to replicate config files in master-slave replication without commit on master?
Yes, replicating the ancillary files (e.g. elevate.xml) is contingent on the index changing. You wouldn't want these files copied down every time the slave polled the master, so the replication is part of index replication if (and only if) the index on the master has changed. You could manually copy the files from the master to the slave perhaps? Best, Erick On Mon, Sep 5, 2016 at 7:49 AM, Georg Sorstwrote: > Hi! > > According to > https://cwiki.apache.org/confluence/display/solr/Index+Replication#IndexReplication-ReplicatingConfigurationFiles > : > >> Solr replicates configuration files only when the index itself is > replicated. That means even if a configuration file is changed on the > master, that file will be replicated only after there is a new > commit/optimize on master's index. > > However, the behaviour of some components can be changed by just changing a > configuration file. A good example is the Query Elevation component, which > is configured through conf/elevate.xml. The component explicitly allows > configuration during runtime, ie. without changing the index, by just > modifying the config. > > How can I get the Query Elevation component to play nice with Master-Slave > replication? So far I've tried: > > * Manually calling commit() after updating the elevate.xml (that's seems to > be no-op when the index hasn't changed: "No uncommitted changes. Skipping > IW.commit.") > * Manually calling update() after updating the elevate.xml (that's seems to > be no-op when the index hasn't changed: "No uncommitted changes. Skipping > IW.commit.") > * Manually calling > http://slave_host:port/solr/core_name/replication?command=fetchindex (doesn't > do anything either) > > What can I do, short of inserting some dummy data into the index?
Re: How can I set the defaultOperator to be AND?
Hi Bast, Good to know you got it to work - thanks for letting us know! -- Steve www.lucidworks.com > On Sep 2, 2016, at 4:30 AM, Bastien Latard | MDPI AG >wrote: > > Thanks Steve for your advice (i.e.: upgrade to Solr 6.2). > I finally had time to upgrade and can now use "=AND" together with "=a > OR b" and this works as expected. > > I even defined the following line in the defaults settings in the > requestHandler, to overwrite the default behavior: > AND > > Issue fixed :) > > Kind regards, > Bast > > On 05/08/2016 14:57, Bastien Latard | MDPI AG wrote: >> Hi Steve, >> >> I read the thread you sent me (SOLR-8812) and it seems that the 6.1 includes >> this fix, as you said. >> I will upgrade. >> Thank you! >> >> Kind regards, >> Bast >> >> On 05/08/2016 14:37, Steve Rowe wrote: >>> Hi Bastien, >>> >>> Have you tried upgrading to 6.1? SOLR-8812, mentioned earlier in the >>> thread, was released with 6.1, and is directly aimed at fixing the problem >>> you are having in 6.0 (also a problem in 5.5): when mm is not explicitly >>> provided and the query contains explicit operators (except for AND), >>> edismax now sets mm=0. >>> >>> -- >>> Steve >>> www.lucidworks.com >>> On Aug 5, 2016, at 2:34 AM, Bastien Latard | MDPI AG wrote: Hi Eric & others, Is there any way to overwrite the default OP when we use edismax? Because adding the following line to solrconfig.xml doesn't solve the problem: (Then if I do "q=black OR white", this always gives the results for "black AND white") I did not find a way to define a default OP, which is automatically overwritten by the AND/OR from a query. Example - Debug: defaultOP in solrconfig = AND / q=a or b ==> results for black AND white The correct result should be the following (but I had to force the q.op): ==> I cannot do this in case I want to do "(a AND b) OR c"... Kind regards, Bastien On 27/04/2016 05:30, Erick Erickson wrote: > Defaulting to "OR" has been the behavior since forever, so changing the > behavior now is just not going to happen. Making it fit a new version of > "correct" will change the behavior for every application out there that > has not specified the default behavior. > > There's no a-priori reason to expect "more words to equal fewer docs", I > can just as easily argue that "more words should return more docs". Which > you expect depends on your mental model. > > And providing the default op in your solrconfig.xml request handlers > allows you to implement whatever model your application chooses... > > Best, > Erick > > On Mon, Apr 25, 2016 at 11:32 PM, Bastien Latard - MDPI AG > wrote: > Thank you Shawn, Jan and Georg for your answers. > > Yes, it seems that if I simply remove the defaultOperator it works well > for "composed queries" like '(a:x AND b:y) OR c:z'. > But I think that the default Operator should/could be the AND. > > Because when I add an extra search word, I expect that the results get > more accurate... > (It seems to be what google is also doing now) >| | > > Otherwise, if you make a search and apply another filter (e.g.: sort by > publication date, facets, ...) , user can get the less relevant item > (only 1 word in 4 matches) in first position only because of its date... > > What do you think? > > > Kind regards, > Bastien > > > On 25/04/2016 14:53, Shawn Heisey wrote: >> On 4/25/2016 6:39 AM, Bastien Latard - MDPI AG wrote: >> >>> Remember: >>> If I add the following line to the schema.xml, even if I do a search >>> 'title:"test" OR author:"me"', it will returns documents matching >>> 'title:"test" AND author:"me"': >>> >>> >> The settings in the schema for default field and default operator were >> deprecated a long time ago. I actually have no idea whether they are >> even supported in newer Solr versions. >> >> The q.op parameter controls the default operator, and the df parameter >> controls the default field. These can be set in the request handler >> definition in solrconfig.xml -- usually in "defaults" but there might be >> reason to put them in "invariants" instead. >> >> If you're using edismax, you'd be better off using the mm parameter >> rather than the q.op parameter. The behavior you have described above >> sounds like a change in behavior (some call it a bug) introduced in the >> 5.5 version: >> >> >> https://issues.apache.org/jira/browse/SOLR-8812 >> >> >> If you are using edismax, I suspect that if you set mm=100% instead of >> q.op=AND (or
Re: Solr document missing or not getting indexed though we get 200 ok status from server
On 9/4/2016 10:02 PM, Ganesh M wrote: > We have captured all traffic of HTTP POST request going out from app I'm the one you've interacted with on IRC for this issue. If this index has multiple shards, one thing that might be a problem here is the ShardHandler that's internal to Solr. This is the internal HttpClient that distributes requests between Solr nodes. You may need to bump up the maxConnectionsPerHost value from its default of 20 to something larger, like 200 or 300. This goes in a shardHandlerFactory section of solr.xml. If you do not have solr.xml in zookeeper, you'll need to make this change on every Solr node. All Solr nodes will need to be restarted. https://cwiki.apache.org/confluence/display/solr/Format+of+solr.xml I hope this helps, but I cannot be certain that this is the problem. If it does fix your issue, then we might have a bug. Thanks, Shawn
Re: Discreptancy in json.facet uniqe and group.ngroups
Perhaps https://issues.apache.org/jira/browse/SOLR-7452 ? Newsletter and resources for Solr beginners and intermediates: http://www.solr-start.com/ On 5 September 2016 at 23:07, Nick Vasilyevwrote: > Hi, I need to get the number of distinct values of a field and I am getting > different counts between the json.facet interface and group.ngroups. Here > are the two queries: > > {'q': '*:*', > 'rows': 0, > 'json.facet': '{'mfr': "unique('mfr')"}' > }) > > This brings up around 6,000 in the mfr field. > > However, if I run the following query, I get around 22,000: > {'q': '*:*', > 'rows': 0, > 'group': 'true', > 'group.ngroups': 'true', > 'group.field': 'mfr' } > > I am running solr 6.1.0 with 4 shards, I ran through some estimates and it > looks like each shard has around 6k manufacturers. Does anyone have any > ideas why this is happening? > > Thanks
Discreptancy in json.facet uniqe and group.ngroups
Hi, I need to get the number of distinct values of a field and I am getting different counts between the json.facet interface and group.ngroups. Here are the two queries: {'q': '*:*', 'rows': 0, 'json.facet': '{'mfr': "unique('mfr')"}' }) This brings up around 6,000 in the mfr field. However, if I run the following query, I get around 22,000: {'q': '*:*', 'rows': 0, 'group': 'true', 'group.ngroups': 'true', 'group.field': 'mfr' } I am running solr 6.1.0 with 4 shards, I ran through some estimates and it looks like each shard has around 6k manufacturers. Does anyone have any ideas why this is happening? Thanks
Wrong highlighting in stripped HTML field
Hi guys I am having a problem with the standard highlighter. I'm working with Solr 5.4.1. The problem appears in my project, but it is easy to replicate: I create a new core with the conf directory from configsets/basic_configs, so everything is set to defaults. I add the following in schema.xml: Now I add this document (in the admin interface): {"id":"1","testfield":"bla"} I search for: testfield:bla with hl=on=testfield What I get is a response with an incorrectly formatted HTML snippet: "response": { "numFound": 1, "start": 0, "docs": [ { "id": "1", "testfield": "bla", "_version_": 1544645963570741200 } ] }, "highlighting": { "1": { "testfield": [ "bla" ] } } Is there a way to tell the highlighter to just enclose the "bla"? I. e. I want to get bla Best regards Dennis
How to replicate config files in master-slave replication without commit on master?
Hi! According to https://cwiki.apache.org/confluence/display/solr/Index+Replication#IndexReplication-ReplicatingConfigurationFiles : > Solr replicates configuration files only when the index itself is replicated. That means even if a configuration file is changed on the master, that file will be replicated only after there is a new commit/optimize on master's index. However, the behaviour of some components can be changed by just changing a configuration file. A good example is the Query Elevation component, which is configured through conf/elevate.xml. The component explicitly allows configuration during runtime, ie. without changing the index, by just modifying the config. How can I get the Query Elevation component to play nice with Master-Slave replication? So far I've tried: * Manually calling commit() after updating the elevate.xml (that's seems to be no-op when the index hasn't changed: "No uncommitted changes. Skipping IW.commit.") * Manually calling update() after updating the elevate.xml (that's seems to be no-op when the index hasn't changed: "No uncommitted changes. Skipping IW.commit.") * Manually calling http://slave_host:port/solr/core_name/replication?command=fetchindex (doesn't do anything either) What can I do, short of inserting some dummy data into the index?
solr AND riche Data
I index rich data in solr 5.4.1 and I use solarium to search terms in index at the field text ;how to display for each term hes category,synonym,similair result,suggester,autocomplet... for exemple the term to search is q=java similair term is: javascript,javaEE.. framworks:Hibernate,Jboss,strut,spring... category:Informatique NO synonym I deevloppe this interface in php using the framework cakephp for each document in the index I have to fields: id the path of each files(msword and pdf) AND the field text. What is the best approch to build an interface displaying all information for each term .
Custom authentication plugin & inter-node auth
Hi We have just upgraded to 5.4.1 from 5.2.1 and have a custom authentication plugin class configured, which is using Spnego to validate user requests. Since there is now built-in support for inter-node authentication via the PKIAuthenticationPlugin we were expecting this to be activated by default since we're not implementing HttpClientInterceptorPlugin. However, we see that our authentication plugin is being called for requests to admin/info/key when the PKIAuthenticationPlugin is attempting to authenticate an inter-node request. We can modify our plugin to exclude the public key request, but this seems to be an implementation detail of the PKI auth that we shouldn't need to know about? I can see that the SolrAuth header isn't set on the request for the public key, which I can see is controlled by the PKIAuthenticationPlugin's HttpClientConfigurer. Am I missing something, or is it required that custom auth plugins handle the public key request as a special case? Regards Matt
Custom authentication plugin & inter-node auth
Hi We have just upgraded to 5.4.1 from 5.2.1 and have a custom authentication plugin class configured, which is using Spnego to validate user requests. Since there is now built-in support for inter-node authentication via the PKIAuthenticationPlugin we were expecting this to be activated by default since we're not implementing HttpClientInterceptorPlugin. However, we see that our authentication plugin is being called for requests to admin/info/key when the PKIAuthenticationPlugin is attempting to authenticate an inter-node request. We can modify our plugin to exclude the public key request, but this seems to be an implementation detail of the PKI auth that we shouldn't need to know about? I can see that the SolrAuth header isn't set on the request for the public key, which I can see is controlled by the PKIAuthenticationPlugin's HttpClientConfigurer. Am I missing something, or is it required that custom auth plugins handle the public key request as a special case? Regards Matt
Re: Blank/Null value search in term filter
Hi Kishore, Usually, query clause below is used for the task: (+*:* -queryField:[* TO *]) OR queryField:A Ahmet On Monday, September 5, 2016 2:33 PM, Kamal Kishore Aggarwalwrote: Thanks Ahmet for your response and nice suggestion. But, I was looking if there any way out without making any configuration change. Please suggest. On 02-Sep-2016 9:37 PM, "Ahmet Arslan" wrote: > > > Hi Kishore, > > You can employ an impossible token value (say XX) for null values. > This can be done via default value update processor factory. > You index some placeholder token for null values. > fq={!terms f='queryField' separator='|'}A|XX would fetche docs with A or > null values. > Ahmet > > On Friday, September 2, 2016 2:03 PM, Kamal Kishore Aggarwal < > kkroyal@gmail.com> wrote: > > > > Hi, > > We are using solr 5.4.1. > > We are using term filter for multiple value matching purpose. > Example: fq={!terms f='queryField' separator='|'}A|B > > A, B, C are the possible field values for solr field "queryField". There > can docs with null values for the same field. Now, how can I create a term > filter in above fashion that fetches docs with A or null values. > > Please suggest. > > Regards > Kamal >
Re: Blank/Null value search in term filter
If you only have 3 values, can you do negative queries on the ones you want to skip? Regards, Alex On 5 Sep 2016 6:33 PM, "Kamal Kishore Aggarwal"wrote: > Thanks Ahmet for your response and nice suggestion. > > But, I was looking if there any way out without making any configuration > change. > > Please suggest. > > On 02-Sep-2016 9:37 PM, "Ahmet Arslan" wrote: > > > > > > > Hi Kishore, > > > > You can employ an impossible token value (say XX) for null values. > > This can be done via default value update processor factory. > > You index some placeholder token for null values. > > fq={!terms f='queryField' separator='|'}A|XX would fetche docs with A or > > null values. > > Ahmet > > > > On Friday, September 2, 2016 2:03 PM, Kamal Kishore Aggarwal < > > kkroyal@gmail.com> wrote: > > > > > > > > Hi, > > > > We are using solr 5.4.1. > > > > We are using term filter for multiple value matching purpose. > > Example: fq={!terms f='queryField' separator='|'}A|B > > > > A, B, C are the possible field values for solr field "queryField". There > > can docs with null values for the same field. Now, how can I create a > term > > filter in above fashion that fetches docs with A or null values. > > > > Please suggest. > > > > Regards > > Kamal > > >
Re: Blank/Null value search in term filter
Thanks Ahmet for your response and nice suggestion. But, I was looking if there any way out without making any configuration change. Please suggest. On 02-Sep-2016 9:37 PM, "Ahmet Arslan"wrote: > > > Hi Kishore, > > You can employ an impossible token value (say XX) for null values. > This can be done via default value update processor factory. > You index some placeholder token for null values. > fq={!terms f='queryField' separator='|'}A|XX would fetche docs with A or > null values. > Ahmet > > On Friday, September 2, 2016 2:03 PM, Kamal Kishore Aggarwal < > kkroyal@gmail.com> wrote: > > > > Hi, > > We are using solr 5.4.1. > > We are using term filter for multiple value matching purpose. > Example: fq={!terms f='queryField' separator='|'}A|B > > A, B, C are the possible field values for solr field "queryField". There > can docs with null values for the same field. Now, how can I create a term > filter in above fashion that fetches docs with A or null values. > > Please suggest. > > Regards > Kamal >
Re: Re: Tagging and excluding Filters with BlockJoin Queries and BlockJoin Faceting
Hello, I played with example in Yonik's blog q=comment_t:*={!tag=author}author_s:yonik=json=on=0={ authorz:{ type:terms, field:author_s, domain: { excludeTags:"author"}, facet: { inbooks: "unique(_root_)" } }, starz:{ type:terms, field:stars_i, facet: { inbooks:"unique(_root_)" } }, bookz:{ type:query, q:"*:*", domain:{blockParent:"type_s:book"} } } } returns "facets":{ "count":3, "authorz":{ "buckets":[{ "val":"yonik", "count":3, "inbooks":2}, { "val":"dan", "count":2, "inbooks":2}, { "val":"mary", "count":1, "inbooks":1}]}, "starz":{ "buckets":[{ "val":5, "count":3, "inbooks":2}]}, "bookz":{ "count":2}}} It searches/filters on children level. It's mandatory because excludeTags works on fq only. Obviously, parent level filter can be applied via {!child}. Then, it counts two child facets with and without exclusion, and also aggregates counts by parents. So, for me it seems working. But then we need to get parent level resuts, and sadly it's not possible until topdocs() https://issues.apache.org/jira/browse/SOLR-7830, now we can only get number of parents like it's shown. Thus, usually you need to issue two requests one for facets and the second one to get parent results. Also, it make sense to provide an aggregation specialized for blocks instead of unique(_root_), discussed at https://issues.apache.org/jira/browse/SOLR-8998 On Wed, Aug 24, 2016 at 11:52 AM, Tobias Lorenzwrote: > I tried that too, with no effect. > > The excluded facet just disappears completely (even the value that is > filtered on in the fq) when using the exclusion that has been tagged, like > it did before. > When using a random exclusion (e.g. foo) that facet is visible again in > the result set, but that's obviously not helpful, I just tried to see what > it would do. > > So this is my current research result: > > When excluding a facet which has been tagged in a filter query, this facet > corresponding to the fq's tag disappears in the result set in solr 6.1 when > using BlockJoin Queries and json facets (which it shouldn't). > > Let me know if you want me to do more research or have one more idea. > > > -Ursprüngliche Nachricht- > Von: Mikhail Khludnev [mailto:m...@apache.org] > Gesendet: Mittwoch, 24. August 2016 09:06 > An: solr-user > Betreff: Re: Re: Tagging and excluding Filters with BlockJoin Queries and > BlockJoin Faceting > > Sure. There are might mismatch with expectation. However, the first guess > is to put {!tag into beginning. eg, check with fq={!tag=myTag}{!parent > which='isparent:true'}color:blue > > On Tue, Aug 23, 2016 at 4:05 PM, Tobias Lorenz > wrote: > > > Hi Mikhail, > > > > Thanks for replying so quickly with a suggestion. > > > > I'm a colleague of Stefan and working with him on our project. > > > > We tried composing our solr query with exclusion instructions, and the > > result was that the facet excluded by tag did not show up anymore in > > the result, instead of showing all values. > > > > Your example from the last comment, completed by our exlusion > instruction: > > > > json.facet={ > > filter_by_children: { > > type: query, > > q: "isparent:false", > > domain: { > > blockChildren: "isparent:true" > > }, > > facet: { > > colors: { > > type: terms, > > field: color, > > domain:{ > > excludeTags:myTag > > }, > > facet: { > > productsCount: "unique(_root_)" > > } > > } > > } > > } > > } > > > > > > and the corresponding filter query: > > > > fq={!parent which='isparent:true'}{!tag=myTag}color:blue > > > > > > Either this feature is not working yet, or we are making a mistake > > using it. > > Of course we know it's still in development right now. > > > > Might you please have a look if we are doing something obviously wrong? > > > > Thanks, > > Tobias > > > > > > > > >The last comment at https://issues.apache.org/jira/browse/SOLR-8998 > > >shows the current verbose json.facet syntax which provides aggregated > > >facet counts already. It's a little bit slower that child.facet.field. > > >Nevertheless, you can take this sample and add exclusion instructions > > into. > > >It should work. Let me know how does it, please. > > > > > >On Wed, Aug 17, 2016 at 5:35 PM, Stefan Moises > > wrote: > > > > > >> Hi Mikhail, > > >> > > >> thanks for the info ... what is the advantage of using the JSON > > >> FACET > > API > > >> compared to the standard BlockJoinQuery features? > > >> > > >> Is there already anybody working on the tagging/exclusion feature > > >> or is there any timeframe for it? There wasn't any
Re: Function query. Not in range
Hi Emir, Working fine. Thanks. Regards, NKI. 2016-09-05 10:39 GMT+02:00 Emir Arnautovic: > Hi NKI, > > You'll have to negate range or negate - in case you expect only positive > values than it would be {!frange l=100} and if you want to include negative > results, you will have to use > > {!frange l=1}or(query($q1),query($q2))={!frange u=0}sum(Field1, > Ffield2)={!frange l=100}sum(Field1, Ffield2) > > or > > {!frange l=1}not(query($q1))={!frange l=0 u=100}sum(Field1, Ffield2) > > > HTH, > Emir > > > On 04.09.2016 12:37, EbSolutions EbSolutions wrote: > >> Hi, >> I'm using function query to query on range using sum function. >> {!frange l=0 u=100} sum(Field1,Ffield2) >> >> this is working well. However, I'm not able to have the document not in >> the >> range. I've tested >> NOT({!frange l=0 u=100} sum(Field1,Ffield2)) but it's not working. >> >> Do you have any idea to do it. >> >> Regards, >> NKI. >> >> > -- > Monitoring * Alerting * Anomaly Detection * Centralized Log Management > Solr & Elasticsearch Support * http://sematext.com/ > >
Re: Use function in condition
Hi Alexandre, Yes you are right. I miss q parameter. It's giving the same result now. Thank you for your help. Regards,Nabil. De : Alexandre RafalovitchÀ : solr-user Envoyé le : Lundi 5 septembre 2016 11h11 Objet : Re: Use function in condition I don't see any 'q' in the second query. Can you add q=*:* and see what happens. Regards, Alex. Newsletter and resources for Solr beginners and intermediates: http://www.solr-start.com/ On 5 September 2016 at 15:57, nabil Kouici wrote: > Hi Emir, > In the first query I'm getting 2 documents (correct) > http://localhost:8983/solr/COL1/select?fq=F3:Active=on={!frange%20l=1}or(query($q1),query($q2))=F1:0732695731=F2:1040167165=0=json > > In the second document I've 0 document as result > http://localhost:8983/solr/COL1/select?indent=on={!frange%20l=1}or(query($q1),query($q2))=F1:0732695731=F2:1040167165=0=json > > > Regards,Nabil. > > De : Emir Arnautovic > À : solr-user@lucene.apache.org > Envoyé le : Lundi 5 septembre 2016 10h48 > Objet : Re: Use function in condition > > Hi Nabil, > > Can you please share exact queries that are executed and results. > > Thanks, > Emir > > > On 05.09.2016 10:43, nabil Kouici wrote: >> Hi Emir, >> Yes I confirm, it's working. But if I put the same condition in fq the >> result is different (result is correct when I put condition in q). >> Thank you. >> Regards,Nabil. >> >> De : Emir Arnautovic >> À : solr-user@lucene.apache.org >> Envoyé le : Lundi 5 septembre 2016 10h30 >> Objet : Re: Use function in condition >> >> Hi Nabil, >> >> It should work. I've just tested on gettingstarted collection (sample >> that comes with Solr) and this query returns expected results. Here is >> what test query looks like: >> >> http://localhost:8983/solr/gettingstarted/select?q=*:*={!frange >> l=1}or(query($q1),query($q2))=id:adata=id:apple >> >> Can you please doublecheck if your query part returns any results. >> >> Regards, >> Emir >> >> >> On 05.09.2016 09:54, nabil Kouici wrote: >>> Hi All, >>> Any feedback please. >>> Regards,Nabil. >>> >>> De : nabil Kouici >>> À : "solr-user@lucene.apache.org" >>> Envoyé le : Vendredi 2 septembre 2016 13h45 >>> Objet : Re: Use function in condition >>> >>> Hi Emir, >>> Thank you for your response. >>> Yes your request is working but only if it's function queries. >>> If you mix function query with normal query, this will not work. For >>> example: >>> fq={!frange >>> l=1}and(query($sub1),or(query($sub2),query($sub3)))=F3:Active={!frange >>> u=2000}sum(F3,F4)={!frange l=3000}sum(F5,F6) >>> Regards,Nabil. >>> >>> De : Emir Arnautovic >>> À : solr-user@lucene.apache.org >>> Envoyé le : Lundi 29 août 2016 14h06 >>> Objet : Re: Use function in condition >>> >>> Hi Nabil, >>> >>> Can you try following: >>> >>> fq={!frange >>> l=1}and(query($sub1),or(query($sub2),query($sub3)))={!frange >>> l=1000}sum(F1,F2)={!frange u=2000}sum(F3,F4)={!frange >>> l=3000}sum(F5,F6) >>> >>> Thanks, >>> Emir >>> >>> On 29.08.2016 11:50, nabil Kouici wrote: Hi solr users, I'm still not able to find a solution either with function query :( My need is simple, I'd like to execute these combined filters : (Sum F1 and F2 greater than 1000) AND ( (sum F3 and F4 lower than 2000) OR (sum F5 and F6 greater then 3000) ) Could you please help me to translate these conditions to solr syntaxe. Regards,Nabil. De : Emir Arnautovic À : solr-user@lucene.apache.org Envoyé le : Jeudi 25 août 2016 16h51 Objet : Re: Use function in condition Hi Nabil, You have limited set functions, but there are logical functions: or, and, not and you have query function so can do more complex queries: fq={!frange l=1}and(query($sub1),termfreq(field3, 300))sub1={!frange l=100}sum(field1,field2) And will return 1 for doc matching both function terms. It would be much simpler if Solr supported relational functions: gt, lt, eq. Hope this gives you ideas how to proceed. Emir On 25.08.2016 12:06, nabil Kouici wrote: > Hi Emir,Thank you for your replay. I've tested the function range query > and this is solving 50% my need. The problem is I'm not able to use it > with other conditions. For exemple: > fq={!frange l=100}sum(field1,field2) and field3:200 > > or > fq=({!frange l=100}sum(field1,field2)) and (field3:200) > > This is giving me an exception:org.apache.solr.search.SyntaxError: > Unexpected text after function: AND Field3:200 > I know that I can use multiple fq but the problem is I can have complexe
Re: Use function in condition
I don't see any 'q' in the second query. Can you add q=*:* and see what happens. Regards, Alex. Newsletter and resources for Solr beginners and intermediates: http://www.solr-start.com/ On 5 September 2016 at 15:57, nabil Kouiciwrote: > Hi Emir, > In the first query I'm getting 2 documents (correct) > http://localhost:8983/solr/COL1/select?fq=F3:Active=on={!frange%20l=1}or(query($q1),query($q2))=F1:0732695731=F2:1040167165=0=json > > In the second document I've 0 document as result > http://localhost:8983/solr/COL1/select?indent=on={!frange%20l=1}or(query($q1),query($q2))=F1:0732695731=F2:1040167165=0=json > > > Regards,Nabil. > > De : Emir Arnautovic > À : solr-user@lucene.apache.org > Envoyé le : Lundi 5 septembre 2016 10h48 > Objet : Re: Use function in condition > > Hi Nabil, > > Can you please share exact queries that are executed and results. > > Thanks, > Emir > > > On 05.09.2016 10:43, nabil Kouici wrote: >> Hi Emir, >> Yes I confirm, it's working. But if I put the same condition in fq the >> result is different (result is correct when I put condition in q). >> Thank you. >> Regards,Nabil. >> >>De : Emir Arnautovic >> À : solr-user@lucene.apache.org >> Envoyé le : Lundi 5 septembre 2016 10h30 >> Objet : Re: Use function in condition >> >> Hi Nabil, >> >> It should work. I've just tested on gettingstarted collection (sample >> that comes with Solr) and this query returns expected results. Here is >> what test query looks like: >> >> http://localhost:8983/solr/gettingstarted/select?q=*:*={!frange >> l=1}or(query($q1),query($q2))=id:adata=id:apple >> >> Can you please doublecheck if your query part returns any results. >> >> Regards, >> Emir >> >> >> On 05.09.2016 09:54, nabil Kouici wrote: >>> Hi All, >>> Any feedback please. >>> Regards,Nabil. >>> >>> De : nabil Kouici >>>À : "solr-user@lucene.apache.org" >>>Envoyé le : Vendredi 2 septembre 2016 13h45 >>>Objet : Re: Use function in condition >>> >>> Hi Emir, >>> Thank you for your response. >>> Yes your request is working but only if it's function queries. >>> If you mix function query with normal query, this will not work. For >>> example: >>> fq={!frange >>> l=1}and(query($sub1),or(query($sub2),query($sub3)))=F3:Active={!frange >>> u=2000}sum(F3,F4)={!frange l=3000}sum(F5,F6) >>> Regards,Nabil. >>> >>> De : Emir Arnautovic >>>À : solr-user@lucene.apache.org >>>Envoyé le : Lundi 29 août 2016 14h06 >>>Objet : Re: Use function in condition >>> >>> Hi Nabil, >>> >>> Can you try following: >>> >>> fq={!frange >>> l=1}and(query($sub1),or(query($sub2),query($sub3)))={!frange >>> l=1000}sum(F1,F2)={!frange u=2000}sum(F3,F4)={!frange >>> l=3000}sum(F5,F6) >>> >>> Thanks, >>> Emir >>> >>> On 29.08.2016 11:50, nabil Kouici wrote: Hi solr users, I'm still not able to find a solution either with function query :( My need is simple, I'd like to execute these combined filters : (Sum F1 and F2 greater than 1000) AND ( (sum F3 and F4 lower than 2000) OR (sum F5 and F6 greater then 3000) ) Could you please help me to translate these conditions to solr syntaxe. Regards,Nabil. De : Emir Arnautovic À : solr-user@lucene.apache.org Envoyé le : Jeudi 25 août 2016 16h51 Objet : Re: Use function in condition Hi Nabil, You have limited set functions, but there are logical functions: or, and, not and you have query function so can do more complex queries: fq={!frange l=1}and(query($sub1),termfreq(field3, 300))sub1={!frange l=100}sum(field1,field2) And will return 1 for doc matching both function terms. It would be much simpler if Solr supported relational functions: gt, lt, eq. Hope this gives you ideas how to proceed. Emir On 25.08.2016 12:06, nabil Kouici wrote: > Hi Emir,Thank you for your replay. I've tested the function range query > and this is solving 50% my need. The problem is I'm not able to use it > with other conditions. For exemple: > fq={!frange l=100}sum(field1,field2) and field3:200 > > or > fq=({!frange l=100}sum(field1,field2)) and (field3:200) > > This is giving me an exception:org.apache.solr.search.SyntaxError: > Unexpected text after function: AND Field3:200 > I know that I can use multiple fq but the problem is I can have complexe > filter like (cond1 OR cond2 AND cond3) > Could you please help. > Regards,Nabil. > > De : Emir Arnautovic >À : solr-user@lucene.apache.org >Envoyé le : Mercredi 17 août 2016 17h08 >Objet : Re: Use function in
Re: Use function in condition
Hi Emir, In the first query I'm getting 2 documents (correct) http://localhost:8983/solr/COL1/select?fq=F3:Active=on={!frange%20l=1}or(query($q1),query($q2))=F1:0732695731=F2:1040167165=0=json In the second document I've 0 document as result http://localhost:8983/solr/COL1/select?indent=on={!frange%20l=1}or(query($q1),query($q2))=F1:0732695731=F2:1040167165=0=json Regards,Nabil. De : Emir ArnautovicÀ : solr-user@lucene.apache.org Envoyé le : Lundi 5 septembre 2016 10h48 Objet : Re: Use function in condition Hi Nabil, Can you please share exact queries that are executed and results. Thanks, Emir On 05.09.2016 10:43, nabil Kouici wrote: > Hi Emir, > Yes I confirm, it's working. But if I put the same condition in fq the result > is different (result is correct when I put condition in q). > Thank you. > Regards,Nabil. > > De : Emir Arnautovic > À : solr-user@lucene.apache.org > Envoyé le : Lundi 5 septembre 2016 10h30 > Objet : Re: Use function in condition > > Hi Nabil, > > It should work. I've just tested on gettingstarted collection (sample > that comes with Solr) and this query returns expected results. Here is > what test query looks like: > > http://localhost:8983/solr/gettingstarted/select?q=*:*={!frange > l=1}or(query($q1),query($q2))=id:adata=id:apple > > Can you please doublecheck if your query part returns any results. > > Regards, > Emir > > > On 05.09.2016 09:54, nabil Kouici wrote: >> Hi All, >> Any feedback please. >> Regards,Nabil. >> >> De : nabil Kouici >> À : "solr-user@lucene.apache.org" >> Envoyé le : Vendredi 2 septembre 2016 13h45 >> Objet : Re: Use function in condition >> >> Hi Emir, >> Thank you for your response. >> Yes your request is working but only if it's function queries. >> If you mix function query with normal query, this will not work. For example: >> fq={!frange >> l=1}and(query($sub1),or(query($sub2),query($sub3)))=F3:Active={!frange >> u=2000}sum(F3,F4)={!frange l=3000}sum(F5,F6) >> Regards,Nabil. >> >> De : Emir Arnautovic >> À : solr-user@lucene.apache.org >> Envoyé le : Lundi 29 août 2016 14h06 >> Objet : Re: Use function in condition >> >> Hi Nabil, >> >> Can you try following: >> >> fq={!frange >> l=1}and(query($sub1),or(query($sub2),query($sub3)))={!frange >> l=1000}sum(F1,F2)={!frange u=2000}sum(F3,F4)={!frange >> l=3000}sum(F5,F6) >> >> Thanks, >> Emir >> >> On 29.08.2016 11:50, nabil Kouici wrote: >>> Hi solr users, >>> I'm still not able to find a solution either with function query :( >>> My need is simple, I'd like to execute these combined filters : >>> (Sum F1 and F2 greater than 1000) AND ( (sum F3 and F4 lower than 2000) OR >>> (sum F5 and F6 greater then 3000) ) >>> Could you please help me to translate these conditions to solr syntaxe. >>> Regards,Nabil. >>> >>> De : Emir Arnautovic >>> À : solr-user@lucene.apache.org >>> Envoyé le : Jeudi 25 août 2016 16h51 >>> Objet : Re: Use function in condition >>> >>> Hi Nabil, >>> >>> You have limited set functions, but there are logical functions: or, >>> and, not and you have query function so can do more complex queries: >>> >>> fq={!frange l=1}and(query($sub1),termfreq(field3, 300))sub1={!frange >>> l=100}sum(field1,field2) >>> >>> And will return 1 for doc matching both function terms. >>> >>> It would be much simpler if Solr supported relational functions: gt, lt, eq. >>> >>> Hope this gives you ideas how to proceed. >>> >>> Emir >>> >>> On 25.08.2016 12:06, nabil Kouici wrote: Hi Emir,Thank you for your replay. I've tested the function range query and this is solving 50% my need. The problem is I'm not able to use it with other conditions. For exemple: fq={!frange l=100}sum(field1,field2) and field3:200 or fq=({!frange l=100}sum(field1,field2)) and (field3:200) This is giving me an exception:org.apache.solr.search.SyntaxError: Unexpected text after function: AND Field3:200 I know that I can use multiple fq but the problem is I can have complexe filter like (cond1 OR cond2 AND cond3) Could you please help. Regards,Nabil. De : Emir Arnautovic À : solr-user@lucene.apache.org Envoyé le : Mercredi 17 août 2016 17h08 Objet : Re: Use function in condition Hi Nabil, You can use frange queries, e.g. you can use fq={!frange l=100}sum(field1,field2) to filter doc with sum greater than 100. Regards, Emir On 17.08.2016 16:26, nabil Kouici wrote: > Hi, > Is it possible to use functions (function query > https://cwiki.apache.org/confluence/display/solr/Function+Queries) in q
Re: Solr document missing or not getting indexed though we get 200 ok status from server
On 5 September 2016 at 11:02, Ganesh Mwrote: > My big question is why is that SOLR can't throw the error when it's not > able to handle the request due to concurrency or for other reason. Solr SHOULD throw an error if there is an issue. The problem is that the concurrency is a HARD problem with a lot of moving parts. So far, we can't even figure out in which subsystem you are seeing the unusual behavior to figure out whether it is a misconfiguration, misunderstanding, bug, or something completely different. However, if you are repeating exactly the same test with the same documents multiple times and getting different documents missing in the end, that does sound like a bug. The question is whether it is a known and fixed bug or something completely new. Any chance you could try this against 6.2? Even in test environment/VM, if you cannot put Java 8 anywhere near production. Regards, Alex. Newsletter and resources for Solr beginners and intermediates: http://www.solr-start.com/
Re: Use function in condition
Hi Nabil, Can you please share exact queries that are executed and results. Thanks, Emir On 05.09.2016 10:43, nabil Kouici wrote: Hi Emir, Yes I confirm, it's working. But if I put the same condition in fq the result is different (result is correct when I put condition in q). Thank you. Regards,Nabil. De : Emir ArnautovicÀ : solr-user@lucene.apache.org Envoyé le : Lundi 5 septembre 2016 10h30 Objet : Re: Use function in condition Hi Nabil, It should work. I've just tested on gettingstarted collection (sample that comes with Solr) and this query returns expected results. Here is what test query looks like: http://localhost:8983/solr/gettingstarted/select?q=*:*={!frange l=1}or(query($q1),query($q2))=id:adata=id:apple Can you please doublecheck if your query part returns any results. Regards, Emir On 05.09.2016 09:54, nabil Kouici wrote: Hi All, Any feedback please. Regards,Nabil. De : nabil Kouici À : "solr-user@lucene.apache.org" Envoyé le : Vendredi 2 septembre 2016 13h45 Objet : Re: Use function in condition Hi Emir, Thank you for your response. Yes your request is working but only if it's function queries. If you mix function query with normal query, this will not work. For example: fq={!frange l=1}and(query($sub1),or(query($sub2),query($sub3)))=F3:Active={!frange u=2000}sum(F3,F4)={!frange l=3000}sum(F5,F6) Regards,Nabil. De : Emir Arnautovic À : solr-user@lucene.apache.org Envoyé le : Lundi 29 août 2016 14h06 Objet : Re: Use function in condition Hi Nabil, Can you try following: fq={!frange l=1}and(query($sub1),or(query($sub2),query($sub3)))={!frange l=1000}sum(F1,F2)={!frange u=2000}sum(F3,F4)={!frange l=3000}sum(F5,F6) Thanks, Emir On 29.08.2016 11:50, nabil Kouici wrote: Hi solr users, I'm still not able to find a solution either with function query :( My need is simple, I'd like to execute these combined filters : (Sum F1 and F2 greater than 1000) AND ( (sum F3 and F4 lower than 2000) OR (sum F5 and F6 greater then 3000) ) Could you please help me to translate these conditions to solr syntaxe. Regards,Nabil. De : Emir Arnautovic À : solr-user@lucene.apache.org Envoyé le : Jeudi 25 août 2016 16h51 Objet : Re: Use function in condition Hi Nabil, You have limited set functions, but there are logical functions: or, and, not and you have query function so can do more complex queries: fq={!frange l=1}and(query($sub1),termfreq(field3, 300))sub1={!frange l=100}sum(field1,field2) And will return 1 for doc matching both function terms. It would be much simpler if Solr supported relational functions: gt, lt, eq. Hope this gives you ideas how to proceed. Emir On 25.08.2016 12:06, nabil Kouici wrote: Hi Emir,Thank you for your replay. I've tested the function range query and this is solving 50% my need. The problem is I'm not able to use it with other conditions. For exemple: fq={!frange l=100}sum(field1,field2) and field3:200 or fq=({!frange l=100}sum(field1,field2)) and (field3:200) This is giving me an exception:org.apache.solr.search.SyntaxError: Unexpected text after function: AND Field3:200 I know that I can use multiple fq but the problem is I can have complexe filter like (cond1 OR cond2 AND cond3) Could you please help. Regards,Nabil. De : Emir Arnautovic À : solr-user@lucene.apache.org Envoyé le : Mercredi 17 août 2016 17h08 Objet : Re: Use function in condition Hi Nabil, You can use frange queries, e.g. you can use fq={!frange l=100}sum(field1,field2) to filter doc with sum greater than 100. Regards, Emir On 17.08.2016 16:26, nabil Kouici wrote: Hi, Is it possible to use functions (function query https://cwiki.apache.org/confluence/display/solr/Function+Queries) in q or fq parameters to build a complex search expression. For exemple, take only documents that sum(field1,field2)> 100. Another exemple: if(test,value1,value2):vallue3 Regards,Nabil. -- Monitoring * Alerting * Anomaly Detection * Centralized Log Management Solr & Elasticsearch Support * http://sematext.com/
Re: Solr document missing or not getting indexed though we get 200 ok status from server
Hi Alex, We have captured all traffic of HTTP POST request going out from app server to SOLR request. Only once that particular document with that id ( in our case it's rowkey ) is going out to SOLR. Also in the SOLR side, we have enabled localhost_access logs and we could see only once that document with that unique ID is reached and in localhost_access logs we could also see 200 OK response getting captured. So we are sure that it's not identical documents going to SOLR. We were using 4.10.2, as we faced this issue, we migrated to 5.4 and we could see same issue appearing in SOLR 5.4 too. My big question is why is that SOLR can't throw the error when it's not able to handle the request due to concurrency or for other reason. May be we are not using it right, but couldn't nail down the problem. We are loosing the reliable factor on SOLR due to this, though SOLR is really NOT. Is there any limit that after number of threads / concurrency, SOLR behaves strange like this ? Any settings, configurations etc to control this ? Regards, Ganesh On Mon, Sep 5, 2016 at 8:13 AM Alexandre Rafalovitchwrote: > I can't tell anything from the document provided. So, here would be my > thoughts: > > If what you see is some sort of concurrency issues, the documents > missed/dropped would unlikely be exactly the same ones. So, if you see > the same documents dropped, it is much more likely to be something to > do with documents, with handler end-points, with sharding, etc. > > If this is easily reproducible, I would run a network analyzer such as > Wireshark and compare your Admin UI session with your client session > and verify that everything expected is absolutely identical. > > You could also temporarily turn on Debug via Admin console (under > logs). You could turn individual elements to Trace to get low-level > information on what's happening. > > Finally, I am assuming this is all happening with latest Solr? If not, > it may be worth trying that and/or checking Jira for bugs. Lots of > things have been fixed/improved in more recent Solr related to > multi-threaded, multi-server setups. > > Regards, >Alex. > > > Newsletter and resources for Solr beginners and intermediates: > http://www.solr-start.com/ > > > On 5 September 2016 at 00:17, Ganesh M > wrote: > > Hi Alex, > > We tried to post the same manually from SOLR ADMIN / documents UI. It got > > indexed successfully. We are sure that it's not duplicate issue. We are > > using default update handler and doesn't configure for custom one. We > fire > > the request to index using direct HTTP request using XML > > format. We are getting 200 OK response. But not getting indexed. > > > > This is the request we fired and got 200. But not getting indexed. Same > > request fired via SOLR ADMIN / Document UI, it's getting indexed > > successfully. > > > > > > false > > 55788327 > > false > > Factuur _PERF29161663_Voor _Va Bene.pdf > > 55788327-PERF29161663 > > 3.00 > > 2916847 > > STCUA02150011472808279078 > > EUR > > 50.00 > > VAT > > 50.00 > > UA0215001:VB1 > > VB1:A02150:vbgroupnft+1:1472808278137 > > RA02150AT009428 > > 10,false > > 62440101 > > UNKNOWN > > RA02150AT009424#Factuur _PERF29161663_Voor _Va Bene.pdf# > > > http://srv-cbe-col1.everbinding.com/thumbs/2016/9/2/A02150/UA0215001/1472808278632.png#f > > RA02150AT009425#pdf.pdf# > > > http://srv-cbe-col1.everbinding.com/thumbs/2016/9/2/A02150/UA0215001/1472808278843.png#f > > 1472808279002 > > > CLEA021509223370564294689844EXCC1019223370564046496793C1LEA021509223370564294752110EXCC201 > > PERF2020916145437 LEA021509223370564294752110EXCC201 Va Bene VA > > Beheer B.V. LEA021509223370564294689844EXCC101 VA Beheer B.V. VA > > Beheer B.V.null null null 2.1null urn:www.cenbii.eu: > > transaction:biicoretrdm010:ver1.0:#urn:www.peppol.eu: > > bis:peppol4a:ver1.0#urn:www.simplerinvoicing.org:si:si-ubl:ver1.1.xnull > > urn:www.cenbii.eu:profile:bii04:ver2.0null PERF20209161454372 null > > 147275460null 3806 UNCL1001 null EUR6 ISO 4217 Alpha null null > > 29168472 null null pdf.pdf2 null null RA02150AT009425#pdf.pdf# > > > http://srv-cbe-col1.everbinding.com/thumbs/2016/9/2/A02150/UA0215001/1472808278843.png#fpdf.pdf > > application/pdf null null Factuur _PERF29161663_Voor _Va Bene.pdf2 null > > PrimaryImagenull null RA02150AT009424#Factuur _PERF29161663_Voor > _Va > > Bene.pdf# > > > http://srv-cbe-col1.everbinding.com/thumbs/2016/9/2/A02150/UA0215001/1472808278632.png#fFactuur > > _PERF29161663_Voor _Va Bene.pdf application/pdf null null null > 62440101ZZZ > > NL:KVK null null 2916847ZZZ NL:VAT null null VA Beheer B.V.null null > > Schurinkstraatnull 23null Ommennull 7731GCnull null NL6 > > ISO3166-1:Alpha2 null null 2916847ZZZ NL:VAT null null VAT6 UN/ECE 5153 > > null null 62440101ZZZ NL:KVK null
Re: Use function in condition
Hi Emir, Yes I confirm, it's working. But if I put the same condition in fq the result is different (result is correct when I put condition in q). Thank you. Regards,Nabil. De : Emir ArnautovicÀ : solr-user@lucene.apache.org Envoyé le : Lundi 5 septembre 2016 10h30 Objet : Re: Use function in condition Hi Nabil, It should work. I've just tested on gettingstarted collection (sample that comes with Solr) and this query returns expected results. Here is what test query looks like: http://localhost:8983/solr/gettingstarted/select?q=*:*={!frange l=1}or(query($q1),query($q2))=id:adata=id:apple Can you please doublecheck if your query part returns any results. Regards, Emir On 05.09.2016 09:54, nabil Kouici wrote: > Hi All, > Any feedback please. > Regards,Nabil. > > De : nabil Kouici > À : "solr-user@lucene.apache.org" > Envoyé le : Vendredi 2 septembre 2016 13h45 > Objet : Re: Use function in condition > > Hi Emir, > Thank you for your response. > Yes your request is working but only if it's function queries. > If you mix function query with normal query, this will not work. For example: > fq={!frange > l=1}and(query($sub1),or(query($sub2),query($sub3)))=F3:Active={!frange > u=2000}sum(F3,F4)={!frange l=3000}sum(F5,F6) > Regards,Nabil. > > De : Emir Arnautovic > À : solr-user@lucene.apache.org > Envoyé le : Lundi 29 août 2016 14h06 > Objet : Re: Use function in condition > > Hi Nabil, > > Can you try following: > > fq={!frange l=1}and(query($sub1),or(query($sub2),query($sub3)))={!frange > l=1000}sum(F1,F2)={!frange u=2000}sum(F3,F4)={!frange > l=3000}sum(F5,F6) > > Thanks, > Emir > > On 29.08.2016 11:50, nabil Kouici wrote: >> Hi solr users, >> I'm still not able to find a solution either with function query :( >> My need is simple, I'd like to execute these combined filters : >> (Sum F1 and F2 greater than 1000) AND ( (sum F3 and F4 lower than 2000) OR >> (sum F5 and F6 greater then 3000) ) >> Could you please help me to translate these conditions to solr syntaxe. >> Regards,Nabil. >> >> De : Emir Arnautovic >> À : solr-user@lucene.apache.org >> Envoyé le : Jeudi 25 août 2016 16h51 >> Objet : Re: Use function in condition >> >> Hi Nabil, >> >> You have limited set functions, but there are logical functions: or, >> and, not and you have query function so can do more complex queries: >> >> fq={!frange l=1}and(query($sub1),termfreq(field3, 300))sub1={!frange >> l=100}sum(field1,field2) >> >> And will return 1 for doc matching both function terms. >> >> It would be much simpler if Solr supported relational functions: gt, lt, eq. >> >> Hope this gives you ideas how to proceed. >> >> Emir >> >> On 25.08.2016 12:06, nabil Kouici wrote: >>> Hi Emir,Thank you for your replay. I've tested the function range query and >>> this is solving 50% my need. The problem is I'm not able to use it with >>> other conditions. For exemple: >>> fq={!frange l=100}sum(field1,field2) and field3:200 >>> >>> or >>> fq=({!frange l=100}sum(field1,field2)) and (field3:200) >>> >>> This is giving me an exception:org.apache.solr.search.SyntaxError: >>> Unexpected text after function: AND Field3:200 >>> I know that I can use multiple fq but the problem is I can have complexe >>> filter like (cond1 OR cond2 AND cond3) >>> Could you please help. >>> Regards,Nabil. >>> >>> De : Emir Arnautovic >>> À : solr-user@lucene.apache.org >>> Envoyé le : Mercredi 17 août 2016 17h08 >>> Objet : Re: Use function in condition >>> >>> Hi Nabil, >>> >>> You can use frange queries, e.g. you can use fq={!frange >>> l=100}sum(field1,field2) to filter doc with sum greater than 100. >>> >>> Regards, >>> Emir >>> >>> >>> On 17.08.2016 16:26, nabil Kouici wrote: Hi, Is it possible to use functions (function query https://cwiki.apache.org/confluence/display/solr/Function+Queries) in q or fq parameters to build a complex search expression. For exemple, take only documents that sum(field1,field2)> 100. Another exemple: if(test,value1,value2):vallue3 Regards,Nabil. -- Monitoring * Alerting * Anomaly Detection * Centralized Log Management Solr & Elasticsearch Support * http://sematext.com/
Re: Solr document missing or not getting indexed though we get 200 ok status from server
Hi Dheerendra, This doesn't always happens. When we add single document, no issue on that. It get's added. But when add in parallel with 50 threads concurrently, out of 2000 documents 10 documents are getting missed ( not getting indexed ). When this is happening, we also tried to do hard commit manually and tried optimize too from Admin screen. But the documents are not getting indexed. As I mentioned we are using autoSoftcommit as 1 sec and autohardcommit as 30 seconds. Regards, Ganesh On Mon, Sep 5, 2016 at 1:47 AM Dheerendra Kulkarniwrote: > Can you try this: > > 1. Add the document > 2. Follow up by optimize in the core admin ui, > > If above works then you may need to check your commit. > > Regards, > Dheerendra > > On Sun, Sep 4, 2016 at 10:47 PM, Ganesh M > wrote: > > > Hi Alex, > > We tried to post the same manually from SOLR ADMIN / documents UI. It got > > indexed successfully. We are sure that it's not duplicate issue. We are > > using default update handler and doesn't configure for custom one. We > fire > > the request to index using direct HTTP request using XML > > format. We are getting 200 OK response. But not getting indexed. > > > > This is the request we fired and got 200. But not getting indexed. Same > > request fired via SOLR ADMIN / Document UI, it's getting indexed > > successfully. > > > > > > false > > 55788327 > > false > > Factuur _PERF29161663_Voor _Va Bene.pdf > > 55788327-PERF29161663 > > 3.00 > > 2916847 > > STCUA02150011472808279078 > > EUR > > 50.00 > > VAT > > 50.00 > > UA0215001:VB1 > > VB1:A02150:vbgroupnft+1:1472808278137 > > RA02150AT009428 > > 10,false > > 62440101 > > UNKNOWN > > RA02150AT009424#Factuur _PERF29161663_Voor _Va Bene.pdf# > > http://srv-cbe-col1.everbinding.com/thumbs/2016/9/2/A02150/ > > UA0215001/1472808278632.png#f > > RA02150AT009425#pdf.pdf# > > http://srv-cbe-col1.everbinding.com/thumbs/2016/9/2/A02150/ > > UA0215001/1472808278843.png#f > > 1472808279002 > > CLEA021509223370564294689844EXCC10192233705640464967 > > 93C1LEA021509223370564294752110EXCC201 > > PERF2020916145437 LEA021509223370564294752110EXCC201 Va Bene VA > > Beheer B.V. LEA021509223370564294689844EXCC101 VA Beheer B.V. VA > > Beheer B.V.null null null 2.1null urn:www.cenbii.eu: > > transaction:biicoretrdm010:ver1.0:#urn:www.peppol.eu: > > bis:peppol4a:ver1.0#urn:www.simplerinvoicing.org:si:si-ubl:ver1.1.xnull > > urn:www.cenbii.eu:profile:bii04:ver2.0null PERF20209161454372 null > > 147275460null 3806 UNCL1001 null EUR6 ISO 4217 Alpha null null > > 29168472 null null pdf.pdf2 null null RA02150AT009425#pdf.pdf# > > http://srv-cbe-col1.everbinding.com/thumbs/2016/9/2/A02150/ > > UA0215001/1472808278843.png#fpdf.pdf > > application/pdf null null Factuur _PERF29161663_Voor _Va Bene.pdf2 null > > PrimaryImagenull null RA02150AT009424#Factuur _PERF29161663_Voor > _Va > > Bene.pdf# > > http://srv-cbe-col1.everbinding.com/thumbs/2016/9/2/A02150/ > > UA0215001/1472808278632.png#fFactuur > > _PERF29161663_Voor _Va Bene.pdf application/pdf null null null > > 62440101ZZZ > > NL:KVK null null 2916847ZZZ NL:VAT null null VA Beheer B.V.null null > > Schurinkstraatnull 23null Ommennull 7731GCnull null NL6 > > ISO3166-1:Alpha2 null null 2916847ZZZ NL:VAT null null VAT6 UN/ECE 5153 > > null null 62440101ZZZ NL:KVK null null null 55788327ZZZ NL:KVK null > null > > 55788327ZZZ NL:KVK null null Va Benenull null Voorstraatnull 26null > > Voorschotennull 2251BNnull null NL6 ISO3166-1:Alpha2 null null > > 2916847ZZZ NL:VAT null null VAT6 UN/ECE 5153 null null 55788327ZZZ > > NL:KVK null null 147517380null null null null NL6 ISO3166-1:Alpha2 > > null null 316 UNCL4461 null 147508740null > 55788327-PERF29161663null > > null 29168472 IBAN null UNKNOWNBIC null Betaling?binnen?14?dagen op > > bankrekening?2916847?onder vermelding van?55788327/PERF29161663null null > > 3.00EUR null null 50.00EUR null 3.00EUR null null S6 UNCL5305 null > > 6.00null null VAT6 UN/ECE 5153 null null 50.00EUR null 50.00EUR null > > 53.00EUR null 53.00EUR null null 102 null 5.00BX null 50.00EUR null > > null PERF2020916145437null PERF2020916145437null null 12 null null > S6 > > UNCL5305 null 6.00null null VAT6 UN/ECE 5153 null null 10.00EUR null > > RA02150AT009424#Factuur _PERF29161663_Voor _Va Bene.pdf# > > http://srv-cbe-col1.everbinding.com/thumbs/2016/9/2/A02150/ > > UA0215001/1472808278632.png#f > > DM001 XCNIN199751 NL:KVK:62440101 false false false false 10 > > UA0215001:VB1 VB1:A02150:vbgroupnft+1:1472808278137 Ontvangen > > 1472808279002 Factuur GLDT9223370666504283001RA6DTP201 VB1 > VB1 > > UA0215001 RA02150AT009428 vbgroupnft+1 A02150 Group > > 55788327 Va Bene XCNL034435 Va Bene > >
Re: Function query. Not in range
Hi NKI, You'll have to negate range or negate - in case you expect only positive values than it would be {!frange l=100} and if you want to include negative results, you will have to use {!frange l=1}or(query($q1),query($q2))={!frange u=0}sum(Field1, Ffield2)={!frange l=100}sum(Field1, Ffield2) or {!frange l=1}not(query($q1))={!frange l=0 u=100}sum(Field1, Ffield2) HTH, Emir On 04.09.2016 12:37, EbSolutions EbSolutions wrote: Hi, I'm using function query to query on range using sum function. {!frange l=0 u=100} sum(Field1,Ffield2) this is working well. However, I'm not able to have the document not in the range. I've tested NOT({!frange l=0 u=100} sum(Field1,Ffield2)) but it's not working. Do you have any idea to do it. Regards, NKI. -- Monitoring * Alerting * Anomaly Detection * Centralized Log Management Solr & Elasticsearch Support * http://sematext.com/
Re: Use function in condition
Hi Nabil, It should work. I've just tested on gettingstarted collection (sample that comes with Solr) and this query returns expected results. Here is what test query looks like: http://localhost:8983/solr/gettingstarted/select?q=*:*={!frange l=1}or(query($q1),query($q2))=id:adata=id:apple Can you please doublecheck if your query part returns any results. Regards, Emir On 05.09.2016 09:54, nabil Kouici wrote: Hi All, Any feedback please. Regards,Nabil. De : nabil KouiciÀ : "solr-user@lucene.apache.org" Envoyé le : Vendredi 2 septembre 2016 13h45 Objet : Re: Use function in condition Hi Emir, Thank you for your response. Yes your request is working but only if it's function queries. If you mix function query with normal query, this will not work. For example: fq={!frange l=1}and(query($sub1),or(query($sub2),query($sub3)))=F3:Active={!frange u=2000}sum(F3,F4)={!frange l=3000}sum(F5,F6) Regards,Nabil. De : Emir Arnautovic À : solr-user@lucene.apache.org Envoyé le : Lundi 29 août 2016 14h06 Objet : Re: Use function in condition Hi Nabil, Can you try following: fq={!frange l=1}and(query($sub1),or(query($sub2),query($sub3)))={!frange l=1000}sum(F1,F2)={!frange u=2000}sum(F3,F4)={!frange l=3000}sum(F5,F6) Thanks, Emir On 29.08.2016 11:50, nabil Kouici wrote: Hi solr users, I'm still not able to find a solution either with function query :( My need is simple, I'd like to execute these combined filters : (Sum F1 and F2 greater than 1000) AND ( (sum F3 and F4 lower than 2000) OR (sum F5 and F6 greater then 3000) ) Could you please help me to translate these conditions to solr syntaxe. Regards,Nabil. De : Emir Arnautovic À : solr-user@lucene.apache.org Envoyé le : Jeudi 25 août 2016 16h51 Objet : Re: Use function in condition Hi Nabil, You have limited set functions, but there are logical functions: or, and, not and you have query function so can do more complex queries: fq={!frange l=1}and(query($sub1),termfreq(field3, 300))sub1={!frange l=100}sum(field1,field2) And will return 1 for doc matching both function terms. It would be much simpler if Solr supported relational functions: gt, lt, eq. Hope this gives you ideas how to proceed. Emir On 25.08.2016 12:06, nabil Kouici wrote: Hi Emir,Thank you for your replay. I've tested the function range query and this is solving 50% my need. The problem is I'm not able to use it with other conditions. For exemple: fq={!frange l=100}sum(field1,field2) and field3:200 or fq=({!frange l=100}sum(field1,field2)) and (field3:200) This is giving me an exception:org.apache.solr.search.SyntaxError: Unexpected text after function: AND Field3:200 I know that I can use multiple fq but the problem is I can have complexe filter like (cond1 OR cond2 AND cond3) Could you please help. Regards,Nabil. De : Emir Arnautovic À : solr-user@lucene.apache.org Envoyé le : Mercredi 17 août 2016 17h08 Objet : Re: Use function in condition Hi Nabil, You can use frange queries, e.g. you can use fq={!frange l=100}sum(field1,field2) to filter doc with sum greater than 100. Regards, Emir On 17.08.2016 16:26, nabil Kouici wrote: Hi, Is it possible to use functions (function query https://cwiki.apache.org/confluence/display/solr/Function+Queries) in q or fq parameters to build a complex search expression. For exemple, take only documents that sum(field1,field2)> 100. Another exemple: if(test,value1,value2):vallue3 Regards,Nabil. -- Monitoring * Alerting * Anomaly Detection * Centralized Log Management Solr & Elasticsearch Support * http://sematext.com/
Re: Use function in condition
Hi All, Any feedback please. Regards,Nabil. De : nabil KouiciÀ : "solr-user@lucene.apache.org" Envoyé le : Vendredi 2 septembre 2016 13h45 Objet : Re: Use function in condition Hi Emir, Thank you for your response. Yes your request is working but only if it's function queries. If you mix function query with normal query, this will not work. For example: fq={!frange l=1}and(query($sub1),or(query($sub2),query($sub3)))=F3:Active={!frange u=2000}sum(F3,F4)={!frange l=3000}sum(F5,F6) Regards,Nabil. De : Emir Arnautovic À : solr-user@lucene.apache.org Envoyé le : Lundi 29 août 2016 14h06 Objet : Re: Use function in condition Hi Nabil, Can you try following: fq={!frange l=1}and(query($sub1),or(query($sub2),query($sub3)))={!frange l=1000}sum(F1,F2)={!frange u=2000}sum(F3,F4)={!frange l=3000}sum(F5,F6) Thanks, Emir On 29.08.2016 11:50, nabil Kouici wrote: > Hi solr users, > I'm still not able to find a solution either with function query :( > My need is simple, I'd like to execute these combined filters : > (Sum F1 and F2 greater than 1000) AND ( (sum F3 and F4 lower than 2000) OR > (sum F5 and F6 greater then 3000) ) > Could you please help me to translate these conditions to solr syntaxe. > Regards,Nabil. > > De : Emir Arnautovic > À : solr-user@lucene.apache.org > Envoyé le : Jeudi 25 août 2016 16h51 > Objet : Re: Use function in condition > > Hi Nabil, > > You have limited set functions, but there are logical functions: or, > and, not and you have query function so can do more complex queries: > > fq={!frange l=1}and(query($sub1),termfreq(field3, 300))sub1={!frange > l=100}sum(field1,field2) > > And will return 1 for doc matching both function terms. > > It would be much simpler if Solr supported relational functions: gt, lt, eq. > > Hope this gives you ideas how to proceed. > > Emir > > On 25.08.2016 12:06, nabil Kouici wrote: >> Hi Emir,Thank you for your replay. I've tested the function range query and >> this is solving 50% my need. The problem is I'm not able to use it with >> other conditions. For exemple: >> fq={!frange l=100}sum(field1,field2) and field3:200 >> >> or >> fq=({!frange l=100}sum(field1,field2)) and (field3:200) >> >> This is giving me an exception:org.apache.solr.search.SyntaxError: >> Unexpected text after function: AND Field3:200 >> I know that I can use multiple fq but the problem is I can have complexe >> filter like (cond1 OR cond2 AND cond3) >> Could you please help. >> Regards,Nabil. >> >> De : Emir Arnautovic >> À : solr-user@lucene.apache.org >> Envoyé le : Mercredi 17 août 2016 17h08 >> Objet : Re: Use function in condition >> >> Hi Nabil, >> >> You can use frange queries, e.g. you can use fq={!frange >> l=100}sum(field1,field2) to filter doc with sum greater than 100. >> >> Regards, >> Emir >> >> >> On 17.08.2016 16:26, nabil Kouici wrote: >>> Hi, >>> Is it possible to use functions (function query >>> https://cwiki.apache.org/confluence/display/solr/Function+Queries) in q or >>> fq parameters to build a complex search expression. >>> For exemple, take only documents that sum(field1,field2)> 100. Another >>> exemple: if(test,value1,value2):vallue3 >>> Regards,Nabil. -- Monitoring * Alerting * Anomaly Detection * Centralized Log Management Solr & Elasticsearch Support * http://sematext.com/