SOLR Installation / Configuration related
Hi, I have a standalone installation of solr 5.3.1 Recently I have started facing an issue, whenever the Garbage collector kicks in, and at that time if there is a request to solr, Solr (http) responds back with status 0 and the service is not served, it gets served after few seconds. The PHP library catches it as Exception of type Apache_Solr_HttpTransportException occurred with Message: '0' Status: Communication Error in File ..libraries/Solr/Service.php at Line ... Any suggestion / ideas to avoid this disruption of service ? Regards, Prasanna.
RE: Again : Query formulation help
Hi, There was another thought in our internal group, I want your opinion will it give me what I am looking for In fq give following {!frange l=2 u=4}sum( exists(query({!v='code1:'})), exists(query({!v='code2:'})), exists(query({!v='code3:'})), exists(query({!v='code4:'})) ) Regards, Prasanna -Original Message- From: Michael Kuhlmann [mailto:k...@solr.info] Sent: Thursday, November 24, 2016 4:29 PM To: solr-user@lucene.apache.org Subject: Re: Again : Query formulation help Hi Prasanna, there's no such filter out-of-the-box. It's similar to the mm parameter in (e)dismax parser, but this only works for full text searches on the same fields. So you have to build the query on your own using all possible permutations: fq=(code1: AND code2:) OR (code1: AND code3:) OR . Of course, such a query can become huge when there are more than four constraints. Best, Michael Am 24.11.2016 um 11:40 schrieb Prasanna S. Dhakephalkar: > Hi, > > > > Need to formulate a distinctive field values query on 4 fields with > minimum match on 2 fields > > > > I have 4 fields in my core > > Code 1 : Values between 1001 to > > Code 2 : Values between 1001 to > > Code 3 : Values between 1001 to > > Code 4 : Values between 1001 to > > > > I want to formulate a query in following manner > > > > Code 1 : > > Code 2 : > > Code 3 : > > Code 4 : > > > > I want to formulate a query, given above parameters, the result should > contain documents where at least 2 of the above match. > > > > Thanks and Regards, > > > > Prasanna > > > >
RE: Again : Query formulation help
:( Thanks Michael. Regards, Prasanna. -Original Message- From: Michael Kuhlmann [mailto:k...@solr.info] Sent: Thursday, November 24, 2016 4:29 PM To: solr-user@lucene.apache.org Subject: Re: Again : Query formulation help Hi Prasanna, there's no such filter out-of-the-box. It's similar to the mm parameter in (e)dismax parser, but this only works for full text searches on the same fields. So you have to build the query on your own using all possible permutations: fq=(code1: AND code2:) OR (code1: AND code3:) OR . Of course, such a query can become huge when there are more than four constraints. Best, Michael Am 24.11.2016 um 11:40 schrieb Prasanna S. Dhakephalkar: > Hi, > > > > Need to formulate a distinctive field values query on 4 fields with > minimum match on 2 fields > > > > I have 4 fields in my core > > Code 1 : Values between 1001 to > > Code 2 : Values between 1001 to > > Code 3 : Values between 1001 to > > Code 4 : Values between 1001 to > > > > I want to formulate a query in following manner > > > > Code 1 : > > Code 2 : > > Code 3 : > > Code 4 : > > > > I want to formulate a query, given above parameters, the result should > contain documents where at least 2 of the above match. > > > > Thanks and Regards, > > > > Prasanna > > > >
Again : Query formulation help
Hi, Need to formulate a distinctive field values query on 4 fields with minimum match on 2 fields I have 4 fields in my core Code 1 : Values between 1001 to Code 2 : Values between 1001 to Code 3 : Values between 1001 to Code 4 : Values between 1001 to I want to formulate a query in following manner Code 1 : Code 2 : Code 3 : Code 4 : I want to formulate a query, given above parameters, the result should contain documents where at least 2 of the above match. Thanks and Regards, Prasanna
RE: Query formulation help
Hi John, I need to formulate a query where the both query variable are from document. Like get me all documents where var_1 > var_2 (var_1 and var_2 both are in document.) Thanks and Regards, Prasanna. -Original Message- From: John Bickerstaff [mailto:j...@johnbickerstaff.com] Sent: Wednesday, October 26, 2016 9:26 PM To: solr-user@lucene.apache.org Subject: Re: Query formulation help For what it's worth- you can do some complex stuff - including using document fields as "variables" -- I did it on an Solr query endpoint (like /search) because I had stuff that was constant for every query. The syntax is challenging, but it can be done. I won't confuse the issue more unless you need something like that - let me know if you do. On Wed, Oct 26, 2016 at 9:52 AM, Tom Evans <tevans...@googlemail.com> wrote: > On Wed, Oct 26, 2016 at 4:00 PM, Prasanna S. Dhakephalkar > <prasann...@merajob.in> wrote: > > Hi, > > > > Thanks for reply, I did > > > > "q": "cost:[2 TO (2+5000)]" > > > > Got > > > > "error": { > > "msg": "org.apache.solr.search.SyntaxError: Cannot parse > 'cost:[2 to (2+5000)]': Encountered \" \"(2+5000) > \"\" at line 1, column 18.\nWas expecting one of:\n\"]\" ...\n\"}\" > ...\n", > > } > > > > I want solr to do the addition. > > I tried > > "q": "cost:[2 TO (2+5000)]" > > "q": "cost:[2 TO sum(2,5000)]" > > > > I has not worked. I am missing something. I donot know what. May be > > how > to invoke functions. > > > > Regards, > > > > Prasanna. > > Sorry, I was unclear - do the maths before constructing the query! > > You might be able to do this with function queries, but why bother? If > the number is fixed, then fix it in the query, if it varies then there > must be some code executing on your client that can be used to do a > simple addition. > > Cheers > > Tom >
RE: Query formulation help
John, You are right, I am also looking for document fields as variables. That was going to be my next trials. I have been using admin panel for trying out queries. Regards, Prasanna. -Original Message- From: John Bickerstaff [mailto:j...@johnbickerstaff.com] Sent: Wednesday, October 26, 2016 9:26 PM To: solr-user@lucene.apache.org Subject: Re: Query formulation help For what it's worth- you can do some complex stuff - including using document fields as "variables" -- I did it on an Solr query endpoint (like /search) because I had stuff that was constant for every query. The syntax is challenging, but it can be done. I won't confuse the issue more unless you need something like that - let me know if you do. On Wed, Oct 26, 2016 at 9:52 AM, Tom Evans <tevans...@googlemail.com> wrote: > On Wed, Oct 26, 2016 at 4:00 PM, Prasanna S. Dhakephalkar > <prasann...@merajob.in> wrote: > > Hi, > > > > Thanks for reply, I did > > > > "q": "cost:[2 TO (2+5000)]" > > > > Got > > > > "error": { > > "msg": "org.apache.solr.search.SyntaxError: Cannot parse > 'cost:[2 to (2+5000)]': Encountered \" \"(2+5000) > \"\" at line 1, column 18.\nWas expecting one of:\n\"]\" ...\n\"}\" > ...\n", > > } > > > > I want solr to do the addition. > > I tried > > "q": "cost:[2 TO (2+5000)]" > > "q": "cost:[2 TO sum(2,5000)]" > > > > I has not worked. I am missing something. I donot know what. May be > > how > to invoke functions. > > > > Regards, > > > > Prasanna. > > Sorry, I was unclear - do the maths before constructing the query! > > You might be able to do this with function queries, but why bother? If > the number is fixed, then fix it in the query, if it varies then there > must be some code executing on your client that can be used to do a > simple addition. > > Cheers > > Tom >
RE: Query formulation help
Hi, Thanks for reply, I did "q": "cost:[2 TO (2+5000)]" Got "error": { "msg": "org.apache.solr.search.SyntaxError: Cannot parse 'cost:[2 to (2+5000)]': Encountered \" \"(2+5000) \"\" at line 1, column 18.\nWas expecting one of:\n\"]\" ...\n\"}\" ...\n", } I want solr to do the addition. I tried "q": "cost:[2 TO (2+5000)]" "q": "cost:[2 TO sum(2,5000)]" I has not worked. I am missing something. I donot know what. May be how to invoke functions. Regards, Prasanna. -Original Message- From: Tom Evans [mailto:tevans...@googlemail.com] Sent: Wednesday, October 26, 2016 3:07 PM To: solr-user@lucene.apache.org Subject: Re: Query formulation help On Wed, Oct 26, 2016 at 8:03 AM, Prasanna S. Dhakephalkar <prasann...@merajob.in> wrote: > Hi, > > > > May be very rudimentary question > > > > There is a integer field in a core : "cost" > > Need to build a query that will return documents where 0 < > "cost"-given_number < 500 > cost:[given_number TO (500+given_number)]
Query formulation help
Hi, May be very rudimentary question There is a integer field in a core : "cost" Need to build a query that will return documents where 0 < "cost"-given_number < 500 How can this be achieved ? Thanks. Prasanna.
RE: query formulation
Hi, Further search on net got me answer The query to be a_id:20 OR (*:* NOT a_id:*) I don't understand this syntax I am bit raw at solr query formations :) Regards, Prasanna. From: Prasanna S. Dhakephalkar [mailto:prasann...@merajob.in] Sent: Saturday, September 10, 2016 8:24 AM To: 'solr-user@lucene.apache.org' Subject: query formulation Greetings Group, I am attempting to formulate a query that gives me all the records such that 1. The record does not have field a_id 2. If a_id field exists then it should have a value 20 So, for 1. I used -a_id:* (got 25 results) For 2. I used a_id:20 (got 3 results) For combination I used -a_id:* OR a_id:20 (was expecting 28 results) Got nothing. What Am I missing ? Regards, Prasanna.
query formulation
Greetings Group, I am attempting to formulate a query that gives me all the records such that 1. The record does not have field a_id 2. If a_id field exists then it should have a value 20 So, for 1. I used -a_id:* (got 25 results) For 2. I used a_id:20 (got 3 results) For combination I used -a_id:* OR a_id:20 (was expecting 28 results) Got nothing. What Am I missing ? Regards, Prasanna.
RE: using variables in data-config.xml
Hi Shrinivasa, Thanks for your reply. I think I need to investigate more. Regards, Prasann. -Original Message- From: Srinivasa Meenavali [mailto:smeenav...@professionalaccess.com] Sent: Thursday, August 11, 2016 6:21 PM To: solr-user@lucene.apache.org Subject: RE: using variables in data-config.xml Hi Prasanna, You can use Request Parameters in Solr 5.5 but not in your version . "these parameters can be passed to the full-import command or defined in the section in sol rconfig.xml. This example shows the parameters with the full-import command: dataimport?command=full-import=jdbc:hsqldb:./example-DIH/hsqldb/ex dbcuse r=sa=secret" Regards Srinivas Meenavalli -Original Message----- From: Prasanna S. Dhakephalkar [mailto:prasann...@merajob.in] Sent: Thursday, August 11, 2016 4:40 PM To: solr-user@lucene.apache.org Subject: using variables in data-config.xml Hi, I have 7 cores. In each data-config.xml , I have There is similar structures on production, testing and partner instances. So if I have to make changes I have to do in all data-config files. I am looking for a mechanism where some variables Like dbname=abcd dbusre=username dbpass=password are defined in solr.xml file under ../server/solr_test directory and can be referenced .../servre/solr_test/{core_1,core_2,...core_7}/conf/data-config.xml Tired looking on net, I found articles that are telling me to edit solrconfig.xml in each core, that does not satisfy my need. I am using solr 5.3.1 Regards, Prasanna. This electronic mail transmission may contain privileged, confidential and/or proprietary information intended only for the person(s) named. Any use, distribution, copying or disclosure to another person is strictly prohibited. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email.
using variables in data-config.xml
Hi, I have 7 cores. In each data-config.xml , I have There is similar structures on production, testing and partner instances. So if I have to make changes I have to do in all data-config files. I am looking for a mechanism where some variables Like dbname=abcd dbusre=username dbpass=password are defined in solr.xml file under ../server/solr_test directory and can be referenced .../servre/solr_test/{core_1,core_2,...core_7}/conf/data-config.xml Tired looking on net, I found articles that are telling me to edit solrconfig.xml in each core, that does not satisfy my need. I am using solr 5.3.1 Regards, Prasanna.
RE: Query String Limit
Hi, This got resolved. Needed to do 2 things 1. maxBooleanClauses needed to be set to large value from 1024 in solrconfig.xml for all cores. 2. In jetty.xml file solr.jetty.request.header.size needed to be set to higher value from 8192 Thanks all for giving pointers to come to a solution. Regards, Prasanna. -Original Message- From: Susmit Shukla [mailto:shukla.sus...@gmail.com] Sent: Thursday, May 5, 2016 11:31 AM To: solr-user@lucene.apache.org Subject: Re: Query String Limit Hi Prasanna, What is the exact number you set it to? What error did you get on solr console and in the solr logs? Did you reload the core/restarted solr after bumping up the solrconfig? Thanks, Susmit On Wed, May 4, 2016 at 9:45 PM, Prasanna S. Dhakephalkar < prasann...@merajob.in> wrote: > Hi > > We had increased theto a large number, but it did > not work > > Here is the query > > > http://localhost:8983/solr/collection1/select?fq=record_id%3A(604929+5 > 04197+ > > 500759+510957+624719+524081+544530+375687+494822+468221+553049+441998+495212 > > +462613+623866+344379+462078+501936+189274+609976+587180+620273+479690+60601 > > 8+487078+496314+497899+374231+486707+516582+74518+479684+1696152+1090711+396 > > 784+377205+600603+539686+550483+436672+512228+1102968+600604+487699+612271+4 > > 87978+433952+479846+492699+380838+412290+487086+515836+487957+525335+495426+ > > 619724+49726+444558+67422+368749+630542+473638+613887+1679503+509367+1 > 619724+49726+444558+67422+368749+630542+473638+613887+1679503+509367+1 > 619724+49726+444558+67422+368749+630542+473638+613887+1679503+509367+0 > 619724+49726+444558+67422+368749+630542+473638+613887+1679503+509367+8 > 619724+49726+444558+67422+368749+630542+473638+613887+1679503+509367+2 > 619724+49726+444558+67422+368749+630542+473638+613887+1679503+509367+9 > 619724+49726+444558+67422+368749+630542+473638+613887+1679503+509367+9 > > +498818+528683+530270+595087+468595+585998+487888+600612+515884+455568+60643 > > 8+526281+497992+460147+587530+576456+526021+790508+486148+469160+365923+4846 > > 54+510829+488792+610933+254610+632700+522376+594418+514817+439283+1676569+52 > > 4031+431557+521628+609255+627205+1255921+57+477017+519675+548373+350309+ > > 491176+524276+570935+549458+495765+512814+494722+382249+619036+477309+487718 > > +470604+514622+1240902+570607+613830+519130+479708+630293+496994+623870+5706 > > 72+390434+483496+609115+490875+443859+292168+522383+501802+606498+596773+479 > > 881+486020+488654+490422+512636+495512+489480+626269+614618+498967+476988+47 > > 7608+486568+270095+295480+478367+607120+583892+593474+494373+368030+484522+5 > > 01183+432822+448109+553418+584084+614868+486206+481014+495027+501880+479113+ > > 615208+488161+512278+597663+569409+139097+489490+584000+493619+607479+281080 > > +518617+518803+487896+719003+584153+484341+505689+278177+539722+548001+62529 > > 6+1676456+507566+619039+501882+530385+474125+293642+612857+568418+640839+519 > > 893+524335+612859+618762+479460+479719+593700+573677+525991+610965+462087+52 > > 1251+501197+443642+1684784+533972+510695+475499+490644+613829+613893+479467+ > > 542478+1102898+499230+436921+458632+602303+488468+1684407+584373+494603+4992 > > 45+548019+600436+606997+59+503156+440428+518759+535013+548023+494273+649 > > 062+528704+469282+582249+511250+496466+497675+505937+489504+600444+614240+19 > > 35577+464232+522398+613809+1206232+607149+607644+498059+506810+487115+550976 > > +638174+600849+525655+625011+500082+606336+507156+487887+333601+457209+60111 > > 0+494927+1712081+601280+486061+501558+600451+263864+527378+571918+472415+608 > > 130+212386+380460+590400+478850+631886+486782+608013+613824+581767+527023+62 > > 3207+607013+505819+485418+486786+537626+507047+92+527473+495520+553141+5 > > 17837+497295+563266+495506+532725+267057+497321+453249+524341+429654+720001+ > > 539946+490813+479491+479628+479630+1125985+351147+524296+565077+439949+61241 > > 3+495854+479493+1647796+600259+229346+492571+485638+596394+512112+477237+600 > > 459+263780+704068+485934+450060+475944+582280+488031+1094010+1687904+539515+ > > 525820+539516+505985+600461+488991+387733+520928+362967+351847+531586+616101 > > +479925+494156+511292+515729+601903+282655+491244+610859+486081+325500+43639 > > 7+600708+523445+480737+486083+614767+486278+1267655+484845+495145+562624+493 > > 381+8060+638731+501347+565979+325132+501363+268866+614113+479646+1964487+631 > > 934+25717+461612+376451+513712+527557+459209+610194+1938903+488861+426305+47 > > 7676+1222682+1246647+567986+501908+791653+325802+498354+435156+484862+533068 > > +339875+395827+475148+331094+528741+540715+623480+416601+516419+600473+62563 > > 2+480570+447412+449778+503316+492365+56329
RE: Query String Limit
Hi We had increased the maxBooleanClauses to a large number, but it did not work Here is the query http://localhost:8983/solr/collection1/select?fq=record_id%3A(604929+504197+ 500759+510957+624719+524081+544530+375687+494822+468221+553049+441998+495212 +462613+623866+344379+462078+501936+189274+609976+587180+620273+479690+60601 8+487078+496314+497899+374231+486707+516582+74518+479684+1696152+1090711+396 784+377205+600603+539686+550483+436672+512228+1102968+600604+487699+612271+4 87978+433952+479846+492699+380838+412290+487086+515836+487957+525335+495426+ 619724+49726+444558+67422+368749+630542+473638+613887+1679503+509367+1108299 +498818+528683+530270+595087+468595+585998+487888+600612+515884+455568+60643 8+526281+497992+460147+587530+576456+526021+790508+486148+469160+365923+4846 54+510829+488792+610933+254610+632700+522376+594418+514817+439283+1676569+52 4031+431557+521628+609255+627205+1255921+57+477017+519675+548373+350309+ 491176+524276+570935+549458+495765+512814+494722+382249+619036+477309+487718 +470604+514622+1240902+570607+613830+519130+479708+630293+496994+623870+5706 72+390434+483496+609115+490875+443859+292168+522383+501802+606498+596773+479 881+486020+488654+490422+512636+495512+489480+626269+614618+498967+476988+47 7608+486568+270095+295480+478367+607120+583892+593474+494373+368030+484522+5 01183+432822+448109+553418+584084+614868+486206+481014+495027+501880+479113+ 615208+488161+512278+597663+569409+139097+489490+584000+493619+607479+281080 +518617+518803+487896+719003+584153+484341+505689+278177+539722+548001+62529 6+1676456+507566+619039+501882+530385+474125+293642+612857+568418+640839+519 893+524335+612859+618762+479460+479719+593700+573677+525991+610965+462087+52 1251+501197+443642+1684784+533972+510695+475499+490644+613829+613893+479467+ 542478+1102898+499230+436921+458632+602303+488468+1684407+584373+494603+4992 45+548019+600436+606997+59+503156+440428+518759+535013+548023+494273+649 062+528704+469282+582249+511250+496466+497675+505937+489504+600444+614240+19 35577+464232+522398+613809+1206232+607149+607644+498059+506810+487115+550976 +638174+600849+525655+625011+500082+606336+507156+487887+333601+457209+60111 0+494927+1712081+601280+486061+501558+600451+263864+527378+571918+472415+608 130+212386+380460+590400+478850+631886+486782+608013+613824+581767+527023+62 3207+607013+505819+485418+486786+537626+507047+92+527473+495520+553141+5 17837+497295+563266+495506+532725+267057+497321+453249+524341+429654+720001+ 539946+490813+479491+479628+479630+1125985+351147+524296+565077+439949+61241 3+495854+479493+1647796+600259+229346+492571+485638+596394+512112+477237+600 459+263780+704068+485934+450060+475944+582280+488031+1094010+1687904+539515+ 525820+539516+505985+600461+488991+387733+520928+362967+351847+531586+616101 +479925+494156+511292+515729+601903+282655+491244+610859+486081+325500+43639 7+600708+523445+480737+486083+614767+486278+1267655+484845+495145+562624+493 381+8060+638731+501347+565979+325132+501363+268866+614113+479646+1964487+631 934+25717+461612+376451+513712+527557+459209+610194+1938903+488861+426305+47 7676+1222682+1246647+567986+501908+791653+325802+498354+435156+484862+533068 +339875+395827+475148+331094+528741+540715+623480+416601+516419+600473+62563 2+480570+447412+449778+503316+492365+563298+486361+500907+514521+138405+6123 27+495344+596879+524918+474563+47273+514739+553189+548418+448943+450612+6006 78+484753+485302+271844+474199+487922+473784+431524+535371+513583+514746+612 534+327470+485855+517878+384102+485856+612768+494791+504840+601330+493551+55 8620+540131+479809+394179+487866+559955+578444+576571+485861+488879+573089+4 97552+487898+490369+535756+614155+633027+487473+517912+523364+527419+600487+ 486128+278040+598478+487395+600579+585691+498970+488151+608187+445943+631971 +230291+504552+534443+501924+489148+292672+528874+434783+479533+485301+61908 9+629083+479383+600981+534717+645420+604921+618714+522329+597822+507413+5706 05+491732+464741+511564+613929+526049+614817+589065+603307+491990+467339+264 426+487907+492982+589067+487674+487820+492983+486708+504140+1216198+625736+4 92984+530116+615663+503248+1896822+600588+518139+494994+621846+599669+488207 +640923+487580+539856+603968+444717+492991+614824+491735+492992+495149+52117 2+365778+261681+600502+479682+597464+492997+587172+624381+482355+1246338+593 642+492000+494707+620137+493000+20617+585199+587176+587177+1877064+587179+53 3478+606061+647089+612257+558521+612259+612261+612264+612266+612268+612273+6 12274+612275+612276+612278+612279+1414843+883571+206887+147419+617296+547518 +547519+524791+541892+541895+541943+541945+541947+34708+638171+589724+602793 +593074+614611+570608+614612+606821+614613+614614+490421+614615+619479+61461 6+1898943+1898942+1898945+614619+1898944+614620+614621+614622+614624+615204+ 614625+615205+615206+615207+529065+293239+615209+623525+526605+610560+610562 +531607+615211+561824+615212+618273+490249+588274+615213+618275+547994+18802
Query String Limit
Hi, I have a solr 5.3.1 standalone installation. When a query is fired on the browser, If the number of characters in the url is 6966, then I get the result, but if it is increased by 1 character, making the URL 6967 then solr does not return any result and screen goes blank. I am not sure if these numbers mean anything. We were trying through PHP application using Solr Library, The query string was long, Tried using GET and POST methods, but were not getting result. The query string was about 16000+ characters. Hence tried to see it on browser that is when we got to the character limit of query. Is it due to reaching memory limit ? Can I increase the limit ? If so How ? Any help in resolving the issue is much appreciated. Regards, Prasanna.
RE: How to formulate query
Hi Susheel, Mikhail, Erick, Thanks for replies. I need to learn more. Regards, Prasanna. -Original Message- From: Susheel Kumar [mailto:susheel2...@gmail.com] Sent: Tuesday, October 13, 2015 12:54 AM To: solr-user@lucene.apache.org Subject: Re: How to formulate query Hi Prassana, This is a highly custom relevancy/ordering requirement and one possible way you can try is by creating multiple fields and coming up with query for each of the searches and boost them accordingly. Thnx On Mon, Oct 12, 2015 at 12:50 PM, Erick Erickson <erickerick...@gmail.com> wrote: > Nothing exists currently that would do this. I would urge you to > revisit the requirements, this kind of super-specific ordering is > often not worth the effort to try to enforce, how does the _user_ > benefit here? > > Best, > Erick > > On Mon, Oct 12, 2015 at 12:47 AM, Prasanna S. Dhakephalkar > <prasann...@merajob.in> wrote: > > Hi, > > > > > > > > I am trying to make a solr search query to get result as under I am > unable > > to get do > > > > > > > > I have a search term say "pit" > > > > The result should have (in that order) > > > > > > > > All docs that have "pit" as first WORD in search field (pit\ *)+ > > > > All docs that have first WORD that starts with "pit" (pit*\ *)+ > > > > All docs that have "pit" as WORD anywhere in search field (except > > first) (*\ pit\ *)+ > > > > All docs that have a WORD starting with "pit" anywhere in search > > field (except first) (*\ pit*\ *)+ > > > > All docs that have "pit" as string anywhere in the search field > > except > cases > > covered above (*pit*) > > > > > > > > Example : > > > > > > > > Pit the pat > > > > Pit digger > > > > Pitch ball > > > > Pitcher man > > > > Dig a pit with shovel > > > > Why do you want to dig a pit with shovel > > > > Cricket pitch is 22 yards > > > > What is pithy, I don't know > > > > Per capita income > > > > Epitome of blah blah > > > > > > > > > > > > How can I achieve this ? > > > > > > > > Regards, > > > > > > > > Prasanna. > > > > > > >
How to formulate query
Hi, I am trying to make a solr search query to get result as under I am unable to get do I have a search term say "pit" The result should have (in that order) All docs that have "pit" as first WORD in search field (pit\ *)+ All docs that have first WORD that starts with "pit" (pit*\ *)+ All docs that have "pit" as WORD anywhere in search field (except first) (*\ pit\ *)+ All docs that have a WORD starting with "pit" anywhere in search field (except first) (*\ pit*\ *)+ All docs that have "pit" as string anywhere in the search field except cases covered above (*pit*) Example : Pit the pat Pit digger Pitch ball Pitcher man Dig a pit with shovel Why do you want to dig a pit with shovel Cricket pitch is 22 yards What is pithy, I don't know Per capita income Epitome of blah blah How can I achieve this ? Regards, Prasanna.