Re: Schema API: Modify Unique Key
Thank you for your replay. We would like to have this functionality in order to change unique key to do a partial update.Partial update cannot work without a unique key and our need is to do like in SQL (update documents set documents.field1=wyz where documents.field2 = xxx). So we put field2 as unique key (uniqueness is OK) and do this kind of update. Regards,Nabil. De : Shawn Heisey <apa...@elyograg.org> À : solr-user@lucene.apache.org Envoyé le : Lundi 27 mars 2017 17h00 Objet : Re: Schema API: Modify Unique Key On 3/27/2017 7:05 AM, nabil Kouici wrote: > We're going to use Solr in our organization (under test) and we want > to set the primary key through schema API, which is not allowed today. > Is this function planned to be implemented in Solr? If yes, do you > have any idea in which version? Steve Rowe has been working on it, as he mentioned. I have asked him a question via the SOLR-7242 issue. I can think of two reasons that this functionality has NOT been written yet: 1) In Cloud mode on a distributed index, it is unlikely that the existing collection will have the documents in the correct shards. Entirely reindexing is strongly recommended in these situations. 2) Before changing the uniqueKey, you must be absolutely certain that the field is the appropriate type and that the field does not contain the same value more than once. If this is not the case, Solr will not behave correctly. Thanks, Shawn
Schema API: Modify Unique Key
Hi All, We're going to use Solr in our organization (under test) and we want to set the primary key through schema API, which is not allowed today. Is this function planned to be implemented in Solr? If yes, do you have any idea in which version? Regards,Nabil.
Re: Joining Across Collections
Hi All, It seems that it's not possible to compare fields from different collections. I have another question: Is it possible to use join to get all documents which existe in the first collection but not in the second.It's equivalent to SQL statement: Select A.* From Collection1 A LEFT OUTER JOIN Collection2 B on A.id=B.idWhere B.Id is NULL; Regards,NKI. De : nabil Kouici <koui...@yahoo.fr.INVALID> À : "solr-user@lucene.apache.org" <solr-user@lucene.apache.org> Envoyé le : Vendredi 20 janvier 2017 14h42 Objet : Re: Joining Across Collections Hi Mikhail, I'm not we can do a negation because Field1 and Field2 are not in the join condition. Regards,Nabil. De : Mikhail Khludnev <m...@apache.org> À : solr-user <solr-user@lucene.apache.org>; nabil Kouici <koui...@yahoo.fr> Envoyé le : Jeudi 19 janvier 2017 9h00 Objet : Re: Joining Across Collections It seems like it can be done by just negating join query or I'm missing something. On Wed, Jan 18, 2017 at 11:32 AM, nabil Kouici <koui...@yahoo.fr.invalid> wrote: > Hi All, > I'm using join across collection feature to do an inner join between 2 > collections. It works fine. > Is it possible to use this feature to compare between fields from > different collections. For exemple: > Collection1 Field1Collection2 Field2 > search document from Collection1 where Field1 != Field2 > In sql, this will translated to: > Select A.* From Collection1 A inner join Collection2 B on A.id=B.idWhere > A.Field1<>B.Field2 > > Thank you. > Regards,NKI. > -- Sincerely yours Mikhail Khludnev
Re: Joining Across Collections
Hi Mikhail, I'm not we can do a negation because Field1 and Field2 are not in the join condition. Regards,Nabil. De : Mikhail Khludnev <m...@apache.org> À : solr-user <solr-user@lucene.apache.org>; nabil Kouici <koui...@yahoo.fr> Envoyé le : Jeudi 19 janvier 2017 9h00 Objet : Re: Joining Across Collections It seems like it can be done by just negating join query or I'm missing something. On Wed, Jan 18, 2017 at 11:32 AM, nabil Kouici <koui...@yahoo.fr.invalid> wrote: > Hi All, > I'm using join across collection feature to do an inner join between 2 > collections. It works fine. > Is it possible to use this feature to compare between fields from > different collections. For exemple: > Collection1 Field1Collection2 Field2 > search document from Collection1 where Field1 != Field2 > In sql, this will translated to: > Select A.* From Collection1 A inner join Collection2 B on A.id=B.idWhere > A.Field1<>B.Field2 > > Thank you. > Regards,NKI. > -- Sincerely yours Mikhail Khludnev
Joining Across Collections
Hi All, I'm using join across collection feature to do an inner join between 2 collections. It works fine. Is it possible to use this feature to compare between fields from different collections. For exemple: Collection1 Field1Collection2 Field2 search document from Collection1 where Field1 != Field2 In sql, this will translated to: Select A.* From Collection1 A inner join Collection2 B on A.id=B.idWhere A.Field1<>B.Field2 Thank you. Regards,NKI.
Facet date Range without start and and date
Hi All, Is it possible to have facet date range without specifying start and and of the range. Otherwise, is it possible to put in the same request start to min value and end to max value. Thank you. Regards,NKI.
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 <arafa...@gmail.com> À : solr-user <solr-user@lucene.apache.org> 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 <koui...@yahoo.fr.invalid> 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 <emir.arnauto...@sematext.com> > À : 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 <emir.arnauto...@sematext.com> >> À : 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 <koui...@yahoo.fr.INVALID> >>> À : "solr-user@lucene.apache.org" <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 <emir.arnauto...@sematext.com> >>> À : 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 <emir.arnauto...@sematext.com> >>>> À : 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={!fra
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 <emir.arnauto...@sematext.com> À : 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 <emir.arnauto...@sematext.com> > À : 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 <koui...@yahoo.fr.INVALID> >> À : "solr-user@lucene.apache.org" <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 <emir.arnauto...@sematext.com> >> À : 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 <emir.arnauto...@sematext.com> >>> À : 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
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 <emir.arnauto...@sematext.com> À : 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 <koui...@yahoo.fr.INVALID> > À : "solr-user@lucene.apache.org" <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 <emir.arnauto...@sematext.com> > À : 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 <emir.arnauto...@sematext.com> >> À : 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 <emir.arnauto...@sematext.com> >>> À : 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 <koui...@yahoo.fr.INVALID> À : "solr-user@lucene.apache.org" <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 <emir.arnauto...@sematext.com> À : 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 <emir.arnauto...@sematext.com> > À : 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 <emir.arnauto...@sematext.com> >> À : 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 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 <emir.arnauto...@sematext.com> À : 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 <emir.arnauto...@sematext.com> > À : 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 <emir.arnauto...@sematext.com> >> À : 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 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 <emir.arnauto...@sematext.com> À : 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 <emir.arnauto...@sematext.com> > À : 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 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 <emir.arnauto...@sematext.com> À : 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/
Use function in condition
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.
DIH parallel processing
Hi All, I'm using DIH to index more than 15M from Sql Server to Solr. This take more than 2 hours. Big amount of this time is consumed by data fetching from database. I'm thinking about a solution to have parallel (thread) loud in the same DIH. Each thread load a part of data. Do you have any experience with this kind of situation? Regards,Nabil.
Re: Missing value with Date Range
Any idea about this issue? Regards,Nabil De : nabil Kouici koui...@yahoo.fr À : solr-user@lucene.apache.org solr-user@lucene.apache.org Envoyé le : Lundi 24 novembre 2014 15h40 Objet : Missing value with Date Range Hi All, I'm trying to get missing count with Date Range adding facet.missing=true as parameter but this not work (which work with facet). Do you have idea how to get missing count with date range or numeric range. Regards,Nabil.
Missing value with Date Range
Hi All, I'm trying to get missing count with Date Range adding facet.missing=true as parameter but this not work (which work with facet). Do you have idea how to get missing count with date range or numeric range. Regards,Nabil.
Using Zookeeper with REST URL
Hi All, I'm connecting to solr using REST API (No library like SolJ). As my solr configuration is in cloud using Zookeeper ensemble, I don't know how to get available Solr server from ZooKeeper to be used in my URL Call. With SolrJ I can do: String zkHostString = 10.0.1.8:2181; CloudSolrServersolr = newCloudSolrServer(zkHostString); solr.connect(); SolrQuerysolrQuery = newSolrQuery(*:*); solrQuery.setRows(10); QueryResponse resp = solr.query(solrQuery); Any help. Regards, Nabil
Define default Shard in implicit collection
Hi All, I have a collection with implicit router. When I try to load document where router doesn't exist I got error:org.apache.solr.common.SolrException: No shard called =2015 in DocCollection(COL)={ Is it possible to define a default shard where document will be loaded if router doesn't exist? Regards,Nabil.
SolrJ: Force SolrServer to send request to specific node
Hi All,When using SolrServer we specify only Zookeeper ensemble and this last will give us reference to solr node to be used. Is it possible to force SolrServer to use a specific node? Regards,Nabil.
Analytics component
Hi All, I'm trying to use Solr to do some analytic function (percentile, median...). I got Trunck branch from Solr which contain the analytics component implementation. I've rebuild solr but unfortunately this component wasn't taken into consideration and no lib generated in /contrib/analytics. Do you have any idea how to get it complied. Otherwise, any idea to have this analytics in Solr. Regards, Nabil.
Re: Analytics component
Thank you for this replay. Yes but many analytics functions are not available like percentile, median, SD deviation... Regards,Nabil Le Jeudi 23 octobre 2014 16h34, Jorge Luis Betancourt González jlbetanco...@uci.cu a écrit : I believe some of this statistics function that you're trying to use are precent in facets. - Original Message - From: nabil Kouici koui...@yahoo.fr To: solr-user@lucene.apache.org Sent: Thursday, October 23, 2014 5:57:27 AM Subject: Analytics component Hi All, I'm trying to use Solr to do some analytic function (percentile, median...). I got Trunck branch from Solr which contain the analytics component implementation. I've rebuild solr but unfortunately this component wasn't taken into consideration and no lib generated in /contrib/analytics. Do you have any idea how to get it complied. Otherwise, any idea to have this analytics in Solr. Regards, Nabil.
CoreAdminRequest in SolrCloud
Hi, I'm trying to get all shards statistics in cloud configuration. I'v used CoreAdminRequest but the problem is I get statistics for only shards (or core) in one node (I've 2 nodes): String zkHostString = 10.0.1.4:2181; CloudSolrServer solrServer= new CloudSolrServer(zkHostString); CoreAdminRequest request = new CoreAdminRequest(); request.setAction(CoreAdminAction.STATUS); CoreAdminResponse cores = request.process(solrServer); for (int i = 0; i cores.getCoreStatus().size(); i++) { NamedListObject ll=cores.getCoreStatus().getVal(i); System.out.println(ll.toString()); } Any idea? Regards, Nabil.
Re: CoreAdminRequest in SolrCloud
Hi Jürgen, As you can see, I'm not using direct connection to node. It's a CloudServer. Do you have example to how to get Cluster status from solrJ. Regards, Nabil. Le Lundi 20 octobre 2014 13h44, Jürgen Wagner (DVT) juergen.wag...@devoteam.com a écrit : Hello Nabil, isn't that what should be expected? Cores are local to nodes, so you only get the core status from the node you're asking. Cluster status refers to the entire SolrCloud cluster, so you will get the status over all collection/nodes/shards[=cores]. Check the Core Admin REST interface for comparison. Cheers, --Jürgen On 20.10.2014 11:41, nabil Kouici wrote: Hi, I'm trying to get all shards statistics in cloud configuration. I'v used CoreAdminRequest but the problem is I get statistics for only shards (or core) in one node (I've 2 nodes): String zkHostString = 10.0.1.4:2181; CloudSolrServer solrServer= new CloudSolrServer(zkHostString); CoreAdminRequest request = new CoreAdminRequest(); request.setAction(CoreAdminAction.STATUS); CoreAdminResponse cores = request.process(solrServer); for (int i = 0; i cores.getCoreStatus().size(); i++) { NamedListObject ll=cores.getCoreStatus().getVal(i); System.out.println(ll.toString()); } Any idea? Regards, Nabil. -- Mit freundlichen Grüßen/Kind regards/Cordialement vôtre/Atentamente/С уважением i.A. Jürgen Wagner Head of Competence Center Intelligence Senior Cloud Consultant Devoteam GmbH, Industriestr. 3, 70565 Stuttgart, Germany Phone: +49 6151 868-8725, Fax: +49 711 13353-53, Mobile: +49 171 864 1543 E-Mail: juergen.wag...@devoteam.com, URL: www.devoteam.de Managing Board: Jürgen Hatzipantelis (CEO) Address of Record: 64331 Weiterstadt, Germany; Commercial Register: Amtsgericht Darmstadt HRB 6450; Tax Number: DE 172 993 071
Re: CoreAdminRequest in SolrCloud
Thank you Jürgen for this link. However, this will not give number of documents and shard size. Regards, Nabil. Le Lundi 20 octobre 2014 15h23, Jürgen Wagner (DVT) juergen.wag...@devoteam.com a écrit : Hi Nabil, you can get /clusterstate.json from Zookeeper. Check CloudSolrServer.getZkStateReader(): http://lucene.apache.org/solr/4_10_1/solr-solrj/org/apache/solr/client/solrj/impl/CloudSolrServer.html Best regards, --Jürgen On 20.10.2014 15:16, nabil Kouici wrote: Hi Jürgen, As you can see, I'm not using direct connection to node. It's a CloudServer. Do you have example to how to get Cluster status from solrJ. Regards, Nabil. Le Lundi 20 octobre 2014 13h44, Jürgen Wagner (DVT) juergen.wag...@devoteam.com a écrit : Hello Nabil, isn't that what should be expected? Cores are local to nodes, so you only get the core status from the node you're asking. Cluster status refers to the entire SolrCloud cluster, so you will get the status over all collection/nodes/shards[=cores]. Check the Core Admin REST interface for comparison. Cheers, --Jürgen On 20.10.2014 11:41, nabil Kouici wrote: Hi, I'm trying to get all shards statistics in cloud configuration. I'v used CoreAdminRequest but the problem is I get statistics for only shards (or core) in one node (I've 2 nodes): String zkHostString = 10.0.1.4:2181; CloudSolrServer solrServer= new CloudSolrServer(zkHostString); CoreAdminRequest request = new CoreAdminRequest(); request.setAction(CoreAdminAction.STATUS); CoreAdminResponse cores = request.process(solrServer); for (int i = 0; i cores.getCoreStatus().size(); i++) { NamedListObject ll=cores.getCoreStatus().getVal(i); System.out.println(ll.toString()); } Any idea? Regards, Nabil. -- Mit freundlichen Grüßen/Kind regards/Cordialement vôtre/Atentamente/С уважением i.A. Jürgen Wagner Head of Competence Center Intelligence Senior Cloud Consultant Devoteam GmbH, Industriestr. 3, 70565 Stuttgart, Germany Phone: +49 6151 868-8725, Fax: +49 711 13353-53, Mobile: +49 171 864 1543 E-Mail: juergen.wag...@devoteam.com, URL: www.devoteam.de Managing Board: Jürgen Hatzipantelis (CEO) Address of Record: 64331 Weiterstadt, Germany; Commercial Register: Amtsgericht Darmstadt HRB 6450; Tax Number: DE 172 993 071
Re: Shard not accessible after restarting
Hi Shawn, This gives me a good understanding. However, I think that slowness in start-up in my case is due to segmentation. Before restarting my index contains 42 segments with 30GB. After restarting, index is in one segment with 22GB. So, I think that shard unavailability is coming from optimization process which is executed when we restart solr. Is there any option is solr to avoid this implicit optimization on startup? What I learned from this experience is that we need to do explicit optimization in regular period to avoid a huge number of segments. Is it a best practice in solr? Regards, Nabil. Le Dimanche 12 octobre 2014 22h03, Shawn Heisey apa...@elyograg.org a écrit : On 10/12/2014 12:46 PM, nabil Kouici wrote: I'm evaluating solr performance. I've created implicit collection with 2 shards in different server. first shard contains 100 million documents (30GB), second contain one million document.When I restart the second solr instance, shard become immediately available. However, when I restart the first solr, shard with 100 million doc take a huge time to be available for search. Is it normal? In Cloud interface, shard is green (Active). My servers have 28GB RAM. I'm using default solrconfig.xml. Does the following URL describe the problem you're running into? http://wiki.apache.org/solr/SolrPerformanceProblems#Slow_startup Thanks, Shawn
Re: Shard not accessible after restarting
Thank you for this replay. I don't understand why solr load my shard in physical memory before becoming available. Is it related to LRU cache management? Regards,Nabil. Le Lundi 13 octobre 2014 16h20, Shawn Heisey apa...@elyograg.org a écrit : On 10/13/2014 1:15 AM, nabil Kouici wrote: This gives me a good understanding. However, I think that slowness in start-up in my case is due to segmentation. Before restarting my index contains 42 segments with 30GB. After restarting, index is in one segment with 22GB. So, I think that shard unavailability is coming from optimization process which is executed when we restart solr. Is there any option is solr to avoid this implicit optimization on startup? What I learned from this experience is that we need to do explicit optimization in regular period to avoid a huge number of segments. Is it a best practice in solr? Solr will *never* do an optimize unless you tell it to. During indexing, Solr does merge segments, but it is exceptionally rare for an automatic merge to create only one segment, and as far as I know, merging will never happen on startup, only when you index. If an optimization is happening on startup, then something somewhere is asking Solr to do it ... but searches should still be possible, even during an optimize. Startup should not be affected very much by an index that has a lot of segments. It will be a little bit slower, but the difference should be small. Thanks, Shawn
Shard not accessible after restarting
Hi All, I'm evaluating solr performance. I've created implicit collection with 2 shards in different server. first shard contains 100 million documents (30GB), second contain one million document.When I restart the second solr instance, shard become immediately available. However, when I restart the first solr, shard with 100 million doc take a huge time to be available for search. Is it normal? In Cloud interface, shard is green (Active). My servers have 28GB RAM. I'm using default solrconfig.xml. Any help? Regards,Nabil.
Multiple shards in the same Solr instance server
Hi All, in Solr, is it possible to create for the same index multiple shards in the same Solr instance (or server)? Regards, Nabil.
Re: Multiple shards in the same Solr instance server
Thank you Aurélien. This is exactly what I'm looking for. Regards, Nabil. Le Vendredi 10 octobre 2014 11h54, aurelien.mazo...@francelabs.com aurelien.mazo...@francelabs.com a écrit : Hi Nabil, Does this blog answer to your question? : http://solr.pl/en/2013/01/07/solr-4-1-solrcloud-multiple-shards-on-the-same-solr-node/ Regards, Aurélien On 10.10.2014 11:48, nabil Kouici wrote: Hi All, in Solr, is it possible to create for the same index multiple shards in the same Solr instance (or server)? Regards, Nabil. On 10.10.2014 11:48, nabil Kouici wrote: Hi All, in Solr, is it possible to create for the same index multiple shards in the same Solr instance (or server)? Regards, Nabil.
Data Import Handler for CSV file
Hi All, Is it possible to have in solr a DIH to load from CSV file. Actually I'm using update/csv handler but not responding to my need. Regards, NKI.
Re: Data Import Handler for CSV file
Hi Ahmet, Thank you for this replay. Agree with you that csv update handler is fast but we need always to specify columns in the http request. In addition, I don't find documentation how to use csv update from solrj. Could you please send me an example of DIH to load CSV file? Regards, Nabil. Le Jeudi 9 octobre 2014 21h05, Ahmet Arslan iori...@yahoo.com.INVALID a écrit : Hi Nabil, whats wrong with csv update handler? It is quite fast. By the way DIH has line entity processor, yes it is doable with existing DIH components. Ahmet On Thursday, October 9, 2014 9:58 PM, nabil Kouici koui...@yahoo.fr wrote: Hi All, Is it possible to have in solr a DIH to load from CSV file. Actually I'm using update/csv handler but not responding to my need. Regards, NKI.