What are Steps to create new filter factory ?
Hi, I want to create a txt file named as lemmatisation.txt and want to use it through filter factory. This flow will work similar to synonym filter factory please provide information on below mentioned points; 1) What are the steps to create a new filter factory which is similar to synonym filter factory. 2) What are the drawbacks / best practices of creating new filter factory. 3) Do we need to change lucene code for the same. Thanks, Prerna -- View this message in context: http://www.nabble.com/What-are-Steps-to-create-new-filter-factory---tp24678722p24678722.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Exception thrown when searching field defined with PhoneticFilterFactory filter...
I have recreated indexes with phonetic filter factory but i am still facing below mentioned issue. Please let me know if i am missing something: I am searching for product_12345 string, which is present in only one record. Issue: Solr return me all indexes which have product_ i.e. it ignore the string present after _. Also debugQuery looks like : product_4844308 product_4844308 PhraseQuery(all:"PRTK ") all:"PRTK " Why is the query showing PRTK ? Also when i use Dismaxrequest it shows: all:ANKL^90.0 all:HNT^123.0 all:KLRS^2000.0 all:HLT^1.0E7 all:M0^100.0 all:KLR^10.0 Why is this showing ANKL, HNT, KLRS. ? Why does solr convert search string to ANKL, HNT, KLRS ... strings? Erik Hatcher wrote: > > > On Jul 24, 2009, at 4:53 AM, prerna07 wrote: >> Does that mean my indexes should be created with phonetic filter >> factory in >> my fieldTypes? Currently I am quering on text fields and phonetic >> factory is >> defined for uery analyser only. > > Yes, if you are applying the phonetic filter you need to do so at > indexing AND query time. Just doing it at query time is not going to > find anything except purely by coincidence. > > Erik > > > -- View this message in context: http://www.nabble.com/Exception-thrown-when-searching-field-defined-with-PhoneticFilterFactory-filter...-tp24543240p24645057.html Sent from the Solr - User mailing list archive at Nabble.com.
How does search work with phonetic filter factory ?
Hi, I am using phonetic filter factory. I am searching for product_12345 string, which is present in only one record. Issue: Solr return me all indexes which have product_ i.e. it ignore the string present after _. Also debugQuery looks like : product_4844308 product_4844308 PhraseQuery(all:"PRTK ") all:"PRTK " Why is the query showing PRTK ? Also when i use Dismaxrequest it shows: all:ANKL^90.0 all:HNT^123.0 all:KLRS^2000.0 all:HLT^1.0E7 all:M0^100.0 all:KLR^10.0 Why is this showing ANKL, HNT, KLRS. ? Why does solr convert search string to ANKL, HNT, KLRS ... strings? ~prerna -- View this message in context: http://www.nabble.com/How-does-search-work-with-phonetic-filter-factory---tp24643678p24643678.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Exception thrown when searching field defined with PhoneticFilterFactory filter...
Does that mean my indexes should be created with phonetic filter factory in my fieldTypes? Currently I am quering on text fields and phonetic factory is defined for uery analyser only. Shalin Shekhar Mangar wrote: > > On Fri, Jul 24, 2009 at 2:01 PM, prerna07 > wrote: > >> >> HI all, >> >> I am also using Phonetic filter factory but it is behaving very weird. >> >> Issue: >> 1) I have total 10400 indexes but when i search for *:* it return me only >> 288 results. AS soon as i remove phonetic filter factory from > type="query"> it start working correctly. > > >> Can someone help me understand the issue with filter factory? >> > > I think you mean you have 10400 documents. If a query of *:* returns > numFound=288 then you actually have only 288 documents. It is very > difficult > to tell what is wrong without knowing your schema and uniqueKey. Does the > uniqueKey of your documents have phonetic filter applied on it? It is best > to keep uniqueKeys un-tokenized. > > >> >> 2) Search on any valid integer value return me full set of records, again >> i >> am not able to understand why ? >> > > What is the defaultSearchField? Which field are you searching the integer > value on? > > > -- > Regards, > Shalin Shekhar Mangar. > > -- View this message in context: http://www.nabble.com/Exception-thrown-when-searching-field-defined-with-PhoneticFilterFactory-filter...-tp24543240p24640981.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Exception thrown when searching field defined with PhoneticFilterFactory filter...
HI all, I am also using Phonetic filter factory but it is behaving very weird. Issue: 1) I have total 10400 indexes but when i search for *:* it return me only 288 results. AS soon as i remove phonetic filter factory from it start working correctly. Can someone help me understand the issue with filter factory? 2) Search on any valid integer value return me full set of records, again i am not able to understand why ? 3) I placed Phonetic filter factory only in . Should i place in at indexing time as well? Thanks, Prerna Robert Petersen-3 wrote: > > Hello all, > > > > I am getting the following exception whenever a user includes a numeric > term in their search, and the search includes a field defined with a > PhoneticFilterFactory and further it occurs whether I use the > DoubleMetaphone encoder or any other. Has this ever come up before? I > can replicate this with no data in the index at all, but if I search the > field by hand from the solr web interface there is no exception. I am > running the lucid imagination 1.3 certified release in a multicore > master/slaves configuration. I will include the field def and the > search/exception below and let me know if I can include any more > clues... seems like it's trying to make a field with no name/value: > > > >positionIncrementGap="100"> > > > > class="solr.WhitespaceTokenizerFactory"/> > > synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/> > > ignoreCase="true" words="stopwords.txt"/> > > > > > > protected="protwords.txt"/> > > class="solr.RemoveDuplicatesTokenFilterFactory"/> > > encoder="DoubleMetaphone" inject="false"/> > > > > > > class="solr.WhitespaceTokenizerFactory"/> > > synonyms="query_synonyms.txt" ignoreCase="true" expand="true"/> > > ignoreCase="true" words="stopwords.txt"/> > > > > > > protected="protwords.txt"/> > > class="solr.RemoveDuplicatesTokenFilterFactory"/> > > encoder="DoubleMetaphone" inject="false"/> > > > > > > > > Jul 17, 2009 2:42:18 PM org.apache.solr.core.SolrCore execute > > INFO: [10017] webapp=/solr path=/select/ > params={f.partitionId.facet.limit=10&f.categoryId.facet.missing=false&f. > categoryId.facet.zeros=false&facet=true&facet=true&facet=true&facet=true > &facet=true&facet=true&f.taxonomyCategoryId.facet.limit=-1&f.priceBucket > id.facet.limit=-1&f.partitionId.facet.zeros=false&f.categoryId.facet.sor > t=true&f.categoryId.facet.limit=-1&f.marketplaceIds.facet.limit=10&f.mfg > Id.facet.missing=false&f.priceBucketid.facet.zeros=false&debugQuery=true > &f.priceBucketid.facet.sort=true&f.partitionId.facet.missing=false&f.tax > onomyCategoryId.facet.zeros=false&f.priceBucketid.facet.missing=false&fa > cet.field=categoryId&facet.field=taxonomyCategoryId&facet.field=partitio > nId&facet.field=mfgId&facet.field=marketplaceIds&facet.field=priceBucket > id&f.mfgId.facet.zeros=false&f.taxonomyCategoryId.facet.sort=true&f.mark > etplaceIds.facet.missing=false&rows=48&f.partitionId.facet.sort=true&sta > rt=0&q=(sku:"va"+AND+sku:"2226"+AND+sku:"w"))+OR+((upc:"va"+AND+upc: > "2226"+AND+upc:"w"))+OR+((mfgPartNo:"va"+AND+mfgPartNo:"2226"+AND+mfgPar > tNo:"w"))+OR+((title_en_uk:"va"+AND+title_en_uk:"2226"+AND+title_en_uk:" > w"))^8+OR+((moreWords_en_uk:"va"+AND+moreWords_en_uk:"2226"+AND+moreWord > s_en_uk:"w"))^2+OR+((allDoublemetaphone:"va"+AND+allDoublemetaphone:"222 > 6"+AND+allDoublemetaphone:"w"))^0.5)+AND+((_val_:"sum\(product\(boosted, > 30\),product\(sales,1000\),product\(views,10\),product\(image,100\)\ > )"&f.taxonomyCategoryId.facet.missing=false&f.mfgId.facet.limit=10&f > .marketplaceIds.facet.sort=true&f.marketplaceIds.facet.zeros=false&f.mfg > Id.facet.sort=true} hits=0 status=500 QTime=84 > > Jul 17, 2009 2:42:18 PM org.apache.solr.common.SolrException log > > SEVERE: java.lang.RuntimeException: java.lang.IllegalArgumentException: > name and value cannot both be empty > > at > org.apache.solr.search.QueryParsing.toString(QueryParsing.java:470) > > at > org.apache.solr.util.SolrPluginUtils.doStandardDebug(SolrPluginUtils.jav > a:399) > > at > org.apache.solr.handler.component.DebugComponent.process(DebugComponent. > java:54) > > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(Search > Handler.java:177) > > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerB > ase.java:131) > > at > org.apache.solr.co
US/UK/CA/AU English support
Hi, 1) Out of US/UK/CA/AU,which english does solr support ? 2) PhoneticFilterFactory perform search for similar sounding words. For example : search on carat will give results of carat, caret and carrat. I also observed that PhoneticFilterFactory also support linguistic variation for US/UK/CA/AU. For example: search on Optimize give results of optimise and optimize. Question : Does PhoneticFilterFactory support all characters/ words of linguistic variations for US/UK/CA/AU OR linguistic search for US/UK/CA/AU will be subset of phonetic search. Please suggest. Thanks, Prerna -- View this message in context: http://www.nabble.com/US-UK-CA-AU-English-support-tp24602629p24602629.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Boosting Code
Hi, I have to boost document, Can someone help me understanding how can we implement docBoost via transformer. Thanks, Prerna Marc Sturlese wrote: > > If you mean at indexing time, you set field boost via data-config.xml. > That boost is parsed from there and set to the lucene document going > through DocBuilder,java, SolrInputDocuemnt.java and DocuemntBuilder.java > In case you want to set full-document boost (not just to a field) you can > do it setting a value to the key $docBoost via transformer. That value is > set using same classes (DocBuilder,java, SolrInputDocuemnt.java and > DocuemntBuilder.java). > > > > dabboo wrote: >> >> Hi, >> >> Can anyone please tell me where I can find the actual >> logic/implementation of field boosting in Solr. I am looking for classes. >> >> Thanks, >> Amit Garg >> > > -- View this message in context: http://www.nabble.com/Boosting-Code-tp22119017p24600769.html Sent from the Solr - User mailing list archive at Nabble.com.
Boosting of search results
HI, I want to boost / block search results, i don't want to use boosting of fields/ term of dismaxrequest handler. I have seen some post saying "setting a value to the key $docBoost via transformer", but i am not sure how to use / set doc boost via transformer. http://www.nabble.com/Boosting-Code-td22119017.html#a22119017 Please let me know how should we use docboost or is there any other way to boost documents. Thanks, Prerna -- View this message in context: http://www.nabble.com/Boosting-of-search-results-tp24600557p24600557.html Sent from the Solr - User mailing list archive at Nabble.com.
Lemmatisation support in Solr
Hi, I am implementing Lemmatisation in Solr, which means if user looks for "Mouse" then it should display results of Mouse and Mice both. I understand that this is something context search. I think of using synonym for this but then synonyms.txt will be having so many records and this will keep on adding. Please suggest how I can implement it in some other way. Thanks, Prerna -- View this message in context: http://www.nabble.com/Lemmatisation-support-in-Solr-tp24583655p24583655.html Sent from the Solr - User mailing list archive at Nabble.com.
Linguistic variation support
Hi, I am implementing linguistic variations in solr search engine. I want to implement this for US/UK/CA/AU english. e.g. Color (UK) = Colour (US) when user searches for either of the word, both results should appear. I don't want to use synonym.txt as this will make synonym.txt very long. Please let me know how can we do this. Thanks, Prerna -- View this message in context: http://www.nabble.com/Linguistic-variation-support-tp24583581p24583581.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr Query | Field:value with dismaxquery
?q=facetFormat_product_s:"Pfqs ePub eBook Sfqs" - return correct results with all the documents which have "Pfqs ePub eBook Sfqs" in field facetFormat_product_s. However it does not work with Dismaxrequest. Also ?q=facetFormat_product_s:"Pfqs Boxed set Sfqs"&qt=dismaxrequest works perfectly fine. I am not able to understand why it is working with "Pfqs Boxed set Sfqs" and not working with "Pfqs ePub eBook Sfqs". Please help. Thanks, Prerna Michael Ludwig-4 wrote: > > prerna07 schrieb: >> >> I am facing issue with query with dismaxrequest. > >> ?q=facetFormat_product_s:"Pfqs ePub eBook Sfqs" - return correct >> results >> >> ?q=facetFormat_product_s:"Pfqs ePub eBook Sfqs"&qt=dismaxrequest - >> dose not return results, although field facetFormat_product_s is >> defined in dismaxrequest Handler of solrconfig.xml > > You mustn't include the fieldname in the query when sending the query > to the DisMax query parser. The fieldname will be interpreted as just > another term to build a query clause from. > >> ?q=facetFormat_product_s:"Pfqs Cassette Sfqs"&qt=dismaxrequest - >> return correct results > > I'd attribute that to the "mm" (minimum match) parameter, the meaning > of which you can understand reading the following page, which it would > probably make a lot of sense to read anyway: > > http://wiki.apache.org/solr/DisMaxRequestHandler > > Michael Ludwig > > -- View this message in context: http://www.nabble.com/Solr-Query-%7C-Field%3Avalue-with-dismaxquery-tp24069634p24106992.html Sent from the Solr - User mailing list archive at Nabble.com.
Default AND operator | search on multiple fields
Hi, I want to perform search with default AND operator on multiple fields. Below mentioned query works fine with AND operator and one field : ?q={!lucene q.op=AND df=prdMainTitle_product_s}Ladybird Shrinkwrap However as soon as I add two fields, it starts giving me records which have two terms "LadyBird" and "Shrinkwrap" but in multiple fields, however it should search only in prdMainTitle_product_s and prdMainSubTitle_product_s ?q={!lucene q.op=AND qf=prdMainTitle_product_s qf=prdMainSubTitle_product_s}Ladybird Shrinkwrap&qt=dismaxrequest Please let me know if there are issues with the query above. Thanks, Prerna -- View this message in context: http://www.nabble.com/Default-AND-operator-%7C-search-on-multiple-fields-tp24106288p24106288.html Sent from the Solr - User mailing list archive at Nabble.com.
Solr Query | Field:value with dismaxquery
I am facing issue with query with dismaxrequest. Issue: I am Querying solr for field specific value, Query is returning correct results with "Pfqs Cassette Sfqs" while it does not work with "Pfqs ePub eBook Sfqs". Sample queries: ?q=facetFormat_product_s:"Pfqs ePub eBook Sfqs" - return correct results ?q=facetFormat_product_s:"Pfqs ePub eBook Sfqs"&qt=dismaxrequest - dose not return results, although field facetFormat_product_s is defined in dismaxrequest Handler of solrconfig.xml ?q=facetFormat_product_s:"Pfqs Cassette Sfqs"&qt=dismaxrequest - return correct results Please suggest if there are issues with dismaxrequest or Query mentioned above. Thanks, Prerna -- View this message in context: http://www.nabble.com/Solr-Query-%7C-Field%3Avalue-with-dismaxquery-tp24069634p24069634.html Sent from the Solr - User mailing list archive at Nabble.com.
Query on date fields
Hi, I have two date attributes in my Indexes: DisplayStartDate_dt DisplayEndDate_dt I need to fetch results where today's date lies between displayStartDate and dislayEndDate. However i cannot send hardcoded displayStartdate and displayEndDate date in query as there are 1000 different dates in indexes Please suggest the query. Thanks, Prerna -- View this message in context: http://www.nabble.com/Query-on-date-fields-tp23919342p23919342.html Sent from the Solr - User mailing list archive at Nabble.com.
Query with AND|OR operator with Dismaxrequest
Hi, I am not getting correct results with a Query which has multiple AND | OR operator. Query Format q=((A AND B) OR (C OR D) OR E) ?q=((intAgeFrom_product_i:[0+TO+3]+AND+intAgeTo_product_i:[3+TO+*])+OR+(intAgeFrom_product_i:[0+TO+3]+AND+intAgeTo_product_i:[0+TO+3])+OR+(ageFrom_product_s:Adult))&qt=dismaxrequest Query return correct result without Dismaxrequest, but incorrect results with Dismaxrequest. I have to use dismaxrequest because i need boosting of search results According to some posts there are issues with AND | OR operator with dismaxrequest. Please let me know if anyone has faced the same problem and if there is any way to make the query work with dismaxrequest. Thanks, Prerna -- View this message in context: http://www.nabble.com/Query-with-AND%7COR-operator-with-Dismaxrequest-tp23594592p23594592.html Sent from the Solr - User mailing list archive at Nabble.com.
Issue with Unique Key
Issue: Unique Key not working. We defined unique key in schema.xml: IndexId_s Still multiple index are getting craete with the same Index_id. Please suggest if we need to add/ change something in schema.xml. Thanks, prerna -- View this message in context: http://www.nabble.com/Issue-with-Unique-Key-tp22759124p22759124.html Sent from the Solr - User mailing list archive at Nabble.com.
Copy solr indexes from 2 solr instance
Hi, Issue 1: I have 2 solr instances, i need to copy indexes from solr1 instance to solr2 without restarting the solr. Please suggest how will this work. Both solr are on multicore setup. Issue2: I deleted all indexes from solr and reloaded my core, solr admin return 0 results. The size of index folder under data directory of core has still number of files? Issue3: Can I copy/paste data folder in running core of solr. Thanks, Prerna -- View this message in context: http://www.nabble.com/Copy-solr-indexes-from-2-solr-instance-tp22702100p22702100.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Querying Solr Index for date fields
We want boosting of results for ?q=dateField:[NOW-45DAYS TO NOW] and ?q=DateField:[NOW TO NOW+45DAYS] below mentioned fq tag gives me error dateField:[NOW-45DAYS TO NOW]^1.0 DateField:[NOW TO NOW+45DAYS]^1.0 Please suggest the syntax of fields defined in fq tag? tHAnks, Prerna Erik Hatcher wrote: > > It doesn't really make sense to use a date field in a dismax qf > parameter. Use an fq parameter instead, to filter results by a date > field. > > Dismax is aimed for end users textual queries, not for field selection > or more refined typed queries like date or numeric ranges. > > Erik > > > On Jan 16, 2009, at 9:23 AM, prerna07 wrote: > >> >> >> We also make query on date ranges, it works when you use NOW function. >> Try using : >> ?q=dateField:[* TO NOW] >> ?q=dateField:[NOW-45DAYS TO NOW] >> ?q=dateField:[NOW TO NOW+45DAYS] >> >> >> Issue: Current issue which i am facing is with dismaxrequesthandler >> for date >> field. >> As soon as I add dateField in dismaxrequest tag, dismax for other >> string / text attributes stops working. My search query is ? >> q=SearchString, >> the error i get is >> "The request sent by the client was syntactically incorrect (Invalid >> Date >> String:'searchTerm')." >> >> Please suggets how can i use date field in qf of dismaxrequest. >> >> Thanks, >> Prerna >> >> >> Akshay-8 wrote: >>> >>> You will have to URL encode the string correctly and supply date in >>> format >>> Solr expects. Please check this: >>> http://wiki.apache.org/solr/SolrQuerySyntax >>> >>> On Fri, Jan 9, 2009 at 12:21 PM, Rayudu >>> wrote: >>> >>>> >>>> Hi All, >>>> I have a field with is solr.DateField in my schema file. If I >>>> want >>>> to >>>> get the docs. for a given date for eg: get all the docs. whose >>>> date value >>>> is >>>> 2009-01-09 then how can I query my index. As solr's date format is >>>> -mm-ddThh:mm:ss, >>>> >>>>if I give the date as 2009-01-09T00:00:00Z it is >>>> thorwing an >>>> exception "solr.SolrException: HTTP code=400, reason=Invalid Date >>>> String:'2009-01-09T00' " . >>>>if I give the date as 2009-01-09 it is >>>> thorwing >>>> an >>>> exception , solr.SolrException: HTTP code=400, reason=Invalid Date >>>> String:'2009-01-09' >>>> >>>> Thanks, >>>> Rayudu. >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/Querying-Solr-Index-for-date-fields-tp21367097p21367097.html >>>> Sent from the Solr - User mailing list archive at Nabble.com. >>>> >>>> >>> >>> >>> -- >>> Regards, >>> Akshay Ukey. >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Querying-Solr-Index-for-date-fields-tp21367097p21500362.html >> Sent from the Solr - User mailing list archive at Nabble.com. > > > -- View this message in context: http://www.nabble.com/Querying-Solr-Index-for-date-fields-tp21367097p21557213.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Querying Solr Index for date fields
We also make query on date ranges, it works when you use NOW function. Try using : ?q=dateField:[* TO NOW] ?q=dateField:[NOW-45DAYS TO NOW] ?q=dateField:[NOW TO NOW+45DAYS] Issue: Current issue which i am facing is with dismaxrequesthandler for date field. As soon as I add dateField in dismaxrequest tag, dismax for other string / text attributes stops working. My search query is ?q=SearchString, the error i get is "The request sent by the client was syntactically incorrect (Invalid Date String:'searchTerm')." Please suggets how can i use date field in qf of dismaxrequest. Thanks, Prerna Akshay-8 wrote: > > You will have to URL encode the string correctly and supply date in format > Solr expects. Please check this: > http://wiki.apache.org/solr/SolrQuerySyntax > > On Fri, Jan 9, 2009 at 12:21 PM, Rayudu wrote: > >> >> Hi All, >> I have a field with is solr.DateField in my schema file. If I want >> to >> get the docs. for a given date for eg: get all the docs. whose date value >> is >> 2009-01-09 then how can I query my index. As solr's date format is >> -mm-ddThh:mm:ss, >> >> if I give the date as 2009-01-09T00:00:00Z it is thorwing an >> exception "solr.SolrException: HTTP code=400, reason=Invalid Date >> String:'2009-01-09T00' " . >> if I give the date as 2009-01-09 it is thorwing >> an >> exception , solr.SolrException: HTTP code=400, reason=Invalid Date >> String:'2009-01-09' >> >> Thanks, >> Rayudu. >> -- >> View this message in context: >> http://www.nabble.com/Querying-Solr-Index-for-date-fields-tp21367097p21367097.html >> Sent from the Solr - User mailing list archive at Nabble.com. >> >> > > > -- > Regards, > Akshay Ukey. > > -- View this message in context: http://www.nabble.com/Querying-Solr-Index-for-date-fields-tp21367097p21500362.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Issue with dismaxrequestHandler for date fields
Now our qf tag looks like : productPublicationDate_product_dt^1.0 Still search on any field (?q=searchTerm) gives following error "The request sent by the client was syntactically incorrect (Invalid Date String:'searchTerm')." Is this valid to define *_dt (i.e. date fields ) in solrConfig.xml ? prerna07 wrote: > > Hi, > > We are facing issues while using dismaxrequesthandler for date fields. > We have to define date fields in of solrConfig.xml. > > > productPublicationDate_product_dt^1.0 > productPublicationDate_product_dt[NOW-45DAYS TO NOW]^1.0 > > > as soon as we add this in solrConfig.xml, dismax stops working for other > attributes. > > ?q=searchterm&qt=dismaxrequest gives error saying that searchterm is > invalid date field. > This is because dismax request tries to search the term in all the > attributes defined in tag, Is there any way to avoid this search. > > Please suggest what should we do to solve the issue. > > Thanks, > > > -- View this message in context: http://www.nabble.com/Issue-with-dismaxrequestHandler-for-date-fields-tp21455862p21471265.html Sent from the Solr - User mailing list archive at Nabble.com.
RE: How to do Query on multiple parameters
Thanks, it works..:) Jana, Kumar Raja wrote: > > Isn't this a single query on 2 parameters/fields? > > Try q=DaVinci AND Price:[10 TO 40] > > -Original Message- > From: prerna07 [mailto:pkhandelw...@sapient.com] > Sent: Wednesday, January 14, 2009 8:07 PM > To: solr-user@lucene.apache.org > Subject: How to do Query on multiple parameters > > > > Our requirement is to make solr query on two or more attributes. for > example > the search criteria is DaVinci AND price between 10 TO 40 > The query i am using is ; > ?q=DaVinci&q=Price:[10 TO 40] > > this query is returning me results for first query parameter only > (?q=DaVinc). > > What should be the query for such multiple parameters. > > Thanks, > Prerna > -- > View this message in context: > http://www.nabble.com/How-to-do-Query-on-multiple-parameters-tp21457148p > 21457148.html > Sent from the Solr - User mailing list archive at Nabble.com. > > > -- View this message in context: http://www.nabble.com/How-to-do-Query-on-multiple-parameters-tp21457148p21470690.html Sent from the Solr - User mailing list archive at Nabble.com.
Single facet on multiple attributes
Hi, How can we create single facet on multiple attributes? Thanks, -- View this message in context: http://www.nabble.com/Single-facet-on-multiple-attributes-tp21457259p21457259.html Sent from the Solr - User mailing list archive at Nabble.com.
How to do Query on multiple parameters
Our requirement is to make solr query on two or more attributes. for example the search criteria is DaVinci AND price between 10 TO 40 The query i am using is ; ?q=DaVinci&q=Price:[10 TO 40] this query is returning me results for first query parameter only (?q=DaVinc). What should be the query for such multiple parameters. Thanks, Prerna -- View this message in context: http://www.nabble.com/How-to-do-Query-on-multiple-parameters-tp21457148p21457148.html Sent from the Solr - User mailing list archive at Nabble.com.
Issue with dismaxrequestHandler for date fields
Hi, We are facing issues while using dismaxrequesthandler for date fields. We have to define date fields in of solrConfig.xml. productPublicationDate_product_dt^1.0 productPublicationDate_product_dt[NOW-45DAYS TO NOW]^1.0 as soon as we add this in solrConfig.xml, dismax stops working for other attributes. ?q=searchterm&qt=dismaxrequest gives error saying that searchterm is invalid date field. This is because dismax request tries to search the term in all the attributes defined in tag, Is there any way to avoid this search. Please suggest what should we do to solve the issue. Thanks, -- View this message in context: http://www.nabble.com/Issue-with-dismaxrequestHandler-for-date-fields-tp21455862p21455862.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Issue in Facet on date field
There can be two other options: 1) To make 2 solr queries to get two facets 2) Use copy field of schema.xml. Thanks, Prerna Marc Sturlese wrote: > > Hey, > That's because Solr just looks for one start,end and gap params in > solrconfig.xml. It just allows you to do datefaceting for differents > fields but just in one range period. > I was in the same situation as you are, what I did was modify the function > getFacetDateCounts() from Simplefacets.class to make it get as match > params (stard/end/gap) as I want. Once it's done I do date faceting in all > time periods. > Result would look like: > > > > 2238 > +3MONTH > 2009-01-13T00:00:00Z > 3822 > +6MONTH > 2009-01-13T00:00:00Z > 3864 > +1YEAR > 2009-01-13T00:00:00Z > > > > Doing facets for the last year, 6 month and 3 month. > I don't think there's a way to do that without modifiying the source (if > you find it let me know :D) > > > > prerna07 wrote: >> >> Hi, >> >> I have to create two facets on a date field: >> 1) First Facet will have results between two date range , i.e. [NOW TO >> NOW+45DAYS] >> 2) Second Facet will have results between two date range , i.e. >> [NOW-45DAYS TO NOW] >> >> I want both results in a single query. The query i am using is mentioned >> below : >> >> &facet=true&facet.date=productPublicationDate_product_dt&f.productPublicationDate_product_dt.facet.date.start=NOW&f.productPublicationDate_product_dt.facet.date.end=NOW+45DAYS&f.productPublicationDate_product_dt.facet.date.gap=%2B45DAYS&facet.date=productPublicationDate_product_dt&f.productPublicationDate_product_dt.facet.date.start=NOW-45DAYS&f.productPublicationDate_product_dt.facet.date.end=NOW&f.productPublicationDate_product_dt.facet.date.gap=%2B45DAYS >> >> ISSUE: >> I am getting same response in two nodes, one query is overriding the >> response of second facet: >> >> - >> >> >> - >> - >> 0 >> +45DAYS >> 2009-02-27T08:37:26.662Z >> >> - >> 0 >> +45DAYS >> 2009-02-27T08:37:26.662Z >> >> >> >> >> Please suggest the way by which i can differentiate these two facet.field >> in the query ? >> > > -- View this message in context: http://www.nabble.com/Issue-in-Facet-on-date-field-tp21431422p21431934.html Sent from the Solr - User mailing list archive at Nabble.com.
Issue in Facet on date field
Hi, I have to create two facets on a date field: 1) First Facet will have results between two date range , i.e. [NOW TO NOW+45DAYS] 2) Second Facet will have results between two date range , i.e. [NOW-45DAYS TO NOW] I want both results in a single query. The query i am using is mentioned below : &facet=true&facet.date=productPublicationDate_product_dt&f.productPublicationDate_product_dt.facet.date.start=NOW&f.productPublicationDate_product_dt.facet.date.end=NOW+45DAYS&f.productPublicationDate_product_dt.facet.date.gap=%2B45DAYS&facet.date=productPublicationDate_product_dt&f.productPublicationDate_product_dt.facet.date.start=NOW-45DAYS&f.productPublicationDate_product_dt.facet.date.end=NOW&f.productPublicationDate_product_dt.facet.date.gap=%2B45DAYS ISSUE: I am getting same response in two nodes, one query is overriding the response of second facet: - - - 0 +45DAYS 2009-02-27T08:37:26.662Z - 0 +45DAYS 2009-02-27T08:37:26.662Z Please suggest the way by which i can differentiate these two facet.field in the query ? -- View this message in context: http://www.nabble.com/Issue-in-Facet-on-date-field-tp21431422p21431422.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr query for date
1) [NOW-45 TO NOW] works for me now. 2) [NOW TO NOW+45DAYS] is still throwing following exception : -- message org.apache.lucene.queryParser.ParseException: Cannot parse 'dateToTest_product_s:[NOW TO NOW 45DAYS]': Encountered "45DAYS" at line 1, column 33. Was expecting: "]" ... description The request sent by the client was syntactically incorrect (org.apache.lucene.queryParser.ParseException: Cannot parse 'dateToTest_product_s:[NOW TO NOW 45DAYS]': Encountered "45DAYS" at line 1, column 33. Was expecting: "]" ... ). - I am running the query on slr admin on internet explorer. i have defined date field as date in schema.xml Akshay-8 wrote: > > On Thu, Jan 8, 2009 at 3:38 PM, prerna07 wrote: > >> >> >> >> My requirement is to fetch records whthin range of 45 days. >> >> 1) ?q=date_field:[NOW TO NOW-45DAYS] is not returning any results > > this works for me if you interchange the range limits viz. [NOW-45DAYS TO > NOW] > >> >> 2) ?q=date_field:[NOW TO NOW+45DAYS] is throwing exception > > this too works for me. > > Have you defined the date_field field as solr.DateField type in the > schema? > date_field should be of type solr.DateField to use range query. > >> >> >> however I get correct results when i run following query : >> ?q=date_field:[* TO NOW] >> >> Please suggest the correct query for range with days. >> >> Thanks, >> Prerna >> >> >> >> >> >> Akshay-8 wrote: >> > >> > You can use DateMath as: >> > >> > date_field:[NOW TO NOW+45DAYS] >> > >> > On Wed, Jan 7, 2009 at 3:00 PM, prerna07 >> wrote: >> > >> >> >> >> Hi, >> >> >> >> what will be the syntax of this sql query >> >> SELECT * FROM table WHERE date > SYSDATE and date > >> in solr format ? >> >> >> >> I need to fetch records where date is between current date and 45 >> days >> >> from >> >> today. >> >> >> >> Thanks, >> >> Prerna >> >> -- >> >> View this message in context: >> >> http://www.nabble.com/Solr-query-for-date-tp21327696p21327696.html >> >> Sent from the Solr - User mailing list archive at Nabble.com. >> >> >> >> >> > >> > >> > -- >> > Regards, >> > Akshay Ukey. >> > >> > Enjoy your job, make lots of money, work within the law. Choose any >> two. >> > -Author Unknown. >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/Solr-query-for-date-tp21327696p21349038.html >> Sent from the Solr - User mailing list archive at Nabble.com. >> >> > > > -- > Regards, > Akshay Ukey. > > -- View this message in context: http://www.nabble.com/Solr-query-for-date-tp21327696p21349994.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr query for date
My requirement is to fetch records whthin range of 45 days. 1) ?q=date_field:[NOW TO NOW-45DAYS] is not returning any results 2) ?q=date_field:[NOW TO NOW+45DAYS] is throwing exception however I get correct results when i run following query : ?q=date_field:[* TO NOW] Please suggest the correct query for range with days. Thanks, Prerna Akshay-8 wrote: > > You can use DateMath as: > > date_field:[NOW TO NOW+45DAYS] > > On Wed, Jan 7, 2009 at 3:00 PM, prerna07 wrote: > >> >> Hi, >> >> what will be the syntax of this sql query >> SELECT * FROM table WHERE date > SYSDATE and date > in solr format ? >> >> I need to fetch records where date is between current date and 45 days >> from >> today. >> >> Thanks, >> Prerna >> -- >> View this message in context: >> http://www.nabble.com/Solr-query-for-date-tp21327696p21327696.html >> Sent from the Solr - User mailing list archive at Nabble.com. >> >> > > > -- > Regards, > Akshay Ukey. > > Enjoy your job, make lots of money, work within the law. Choose any two. > -Author Unknown. > > -- View this message in context: http://www.nabble.com/Solr-query-for-date-tp21327696p21349038.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr query for date
Is this necessary to define date_field as in schema.xml. OR Solr query can work on text field type ? Akshay-8 wrote: > > You can use DateMath as: > > date_field:[NOW TO NOW+45DAYS] > > On Wed, Jan 7, 2009 at 3:00 PM, prerna07 wrote: > >> >> Hi, >> >> what will be the syntax of this sql query >> SELECT * FROM table WHERE date > SYSDATE and date > in solr format ? >> >> I need to fetch records where date is between current date and 45 days >> from >> today. >> >> Thanks, >> Prerna >> -- >> View this message in context: >> http://www.nabble.com/Solr-query-for-date-tp21327696p21327696.html >> Sent from the Solr - User mailing list archive at Nabble.com. >> >> > > > -- > Regards, > Akshay Ukey. > > Enjoy your job, make lots of money, work within the law. Choose any two. > -Author Unknown. > > -- View this message in context: http://www.nabble.com/Solr-query-for-date-tp21327696p21328961.html Sent from the Solr - User mailing list archive at Nabble.com.
Solr query for date
Hi, what will be the syntax of this sql query SELECT * FROM table WHERE date > SYSDATE and date http://www.nabble.com/Solr-query-for-date-tp21327696p21327696.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Issues with facet
Thanks, it helped. We were using *_s fields which had analyser section. We used to copy all fields in some other field type and used this new type in facet. It is working fine now. Thanks, Prerna prerna07 wrote: > > Hi, > > On using Facet in solr query I am facing various issues. > > Scenario 1: > I have 11 Index with tag : productIndex > > my search query is appended by facet parameters : > facet=true&facet.field=Index_Type_s&qt=dismaxrequest > > The facet node i am getting in solr result is : > > - > - > 11 > 11 > 11 > > > > According to my understanding I should get only one result, which should > be like the below mentioned node > > - > 11 > > > Scenario 2: > > My index has following fields : > In Search of the Shape of the Universe, > mathamatics > > My search Query is : > facet=true&facet.field=productDescription_s&qt=dismaxrequest > > The result Solr is giving displaying : > > > - > 1 > 1 > 2 > 1 > 1 > > > I am not able to figure out the facet results. It does noyt contain any > result of Universe, It also removes characters from matahmatics and shape. > > Please help me understanding the issue and let me know if any change in > schema / solrConfig can solve the issue. > > Thanks, > Prerna > > > > > > > -- View this message in context: http://www.nabble.com/Issues-with-facet-tp20090842p20123830.html Sent from the Solr - User mailing list archive at Nabble.com.
Issues with facet
Hi, On using Facet in solr query I am facing various issues. Scenario 1: I have 11 Index with tag : productIndex my search query is appended by facet parameters : facet=true&facet.field=Index_Type_s&qt=dismaxrequest The facet node i am getting in solr result is : - - 11 11 11 According to my understanding I should get only one result, which should be like the below mentioned node - 11 Scenario 2: My index has following fields : In Search of the Shape of the Universe, mathamatics My search Query is : facet=true&facet.field=productDescription_s&qt=dismaxrequest The result Solr is giving displaying : - 1 1 2 1 1 I am not able to figure out the facet results. It does noyt contain any result of Universe, It also removes characters from matahmatics and shape. Please help me understanding the issue and let me know if any change in schema / solrConfig can solve the issue. Thanks, Prerna -- View this message in context: http://www.nabble.com/Issues-with-facet-tp20090842p20090842.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: search not working correctly
Yes, We want search on these incomplete words. Thanks, Shalin Shekhar Mangar wrote: > > If "upl" is not a token in the index, then a simple query will not return > any document. You should use upl* if you want to match documents > containing > the term "upload". However, do you really want to search for incomplete > words? > > On Mon, Oct 20, 2008 at 2:40 PM, prerna07 <[EMAIL PROTECTED]> > wrote: > >> >> Hi, >> >> I have some indexes with string values "upload". >> Search on &q=upload and &q=upl* gives me all results. >> >> Issues : >> Search on &q=upl gives me ZERO result. >> >> Do i need to append query with some other parameter or solr search does >> not >> work in this scenario? >> >> Thanks, >> Prerna >> -- >> View this message in context: >> http://www.nabble.com/search-not-working-correctly-tp20065781p20065781.html >> Sent from the Solr - User mailing list archive at Nabble.com. >> >> > > > -- > Regards, > Shalin Shekhar Mangar. > > -- View this message in context: http://www.nabble.com/search-not-working-correctly-tp20065781p20066791.html Sent from the Solr - User mailing list archive at Nabble.com.
search not working correctly
Hi, I have some indexes with string values "upload". Search on &q=upload and &q=upl* gives me all results. Issues : Search on &q=upl gives me ZERO result. Do i need to append query with some other parameter or solr search does not work in this scenario? Thanks, Prerna -- View this message in context: http://www.nabble.com/search-not-working-correctly-tp20065781p20065781.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Synonym format not working
The issue with synonym arise when i have number in synonym defination: ccc =>1,2 gives following result in debugQuery= true : MultiPhraseQuery(all:" (1 ) (2 ccc ) 3") all:" (1 ) (2 ccc ) 3" However fooaaa=> fooaaa, baraaa,bazaaa gives correct synonym results: all:fooaaa all:baraaa all:bazaaa all:fooaaa all:baraaa all:bazaaa Any pointers to solve the issue with numbers in synonyms? Thanks, Prerna hossman wrote: > > > : I am not getting any search result for ccc. I have created indexes with > : string value. > : > : Do i need to change anything in schema .xml ? > : > : String tag from Schema.xml : > : : omitNorms="true"> > : > > StrField doesn't use an ... if you look at the values you've > indexed with the LukeRequestHandler you'll see that the literal values are > in your index ... you'll want to change that to "solr.TextField" > > Most likely, you'll want to add an as well, > otherwise the same analyser will be used at index and at query time (so > you'll get synonym and worddelim expansion in both cases, and things won't > match the way you expect. > > > > > -Hoss > > > -- View this message in context: http://www.nabble.com/Synonym--format-not-working-tp20026988p20064274.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Synonym format not working
Actual synonym : ccc => 1,2 ccc=>3 The result when i added &dubugQuery=true is: - - 0 15 - 10 0 on ccc true 2.2 - ccc ccc MultiPhraseQuery(all:" (1 ) (2 ccc ) 3") all:" (1 ) (2 ccc ) 3" OldLuceneQParser - 8.0 - 2.0 - 1.0 - 0.0 - 0.0 - 0.0 - 0.0 - 4.0 - 2.0 - 0.0 - 0.0 - 0.0 - 2.0 Otis Gospodnetic wrote: > > I can't see the problem at the moment. What do you see when you use > &debugQuery=true in the URL? Do you see the query that includes synonyms? > Can you give us the actual query and actual synonyms? > > > Otis > -- > Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch > > > > - Original Message >> From: prerna07 <[EMAIL PROTECTED]> >> To: solr-user@lucene.apache.org >> Sent: Friday, October 17, 2008 12:36:40 AM >> Subject: Synonym format not working >> >> >> Hi, >> >> I am facing issue in synonym search of solr. The synonym.txt contain the >> format: >> >> ccc => 1,2,ccc >> ccc => 3 >> >> I am not getting any search result for ccc. I have created indexes with >> string value. >> >> Do i need to change anything in schema .xml ? >> >> String tag from Schema.xml : >> >> omitNorms="true"> >> >> >> >> ignoreCase="true" expand="true"/> >> >> words="stopwords.txt"/> >> >> generateWordParts="1" generateNumberParts="1" catenateWords="0" >> catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/> >> >> >> protected="protwords.txt"/> >> >> >> >> >> Any pointers to solve the issue? >> >> Thanks, >> Prerna >> >> >> -- >> View this message in context: >> http://www.nabble.com/Synonym--format-not-working-tp20026988p20026988.html >> Sent from the Solr - User mailing list archive at Nabble.com. > > > -- View this message in context: http://www.nabble.com/Synonym--format-not-working-tp20026988p20027720.html Sent from the Solr - User mailing list archive at Nabble.com.
Synonym format not working
Hi, I am facing issue in synonym search of solr. The synonym.txt contain the format: ccc => 1,2,ccc ccc => 3 I am not getting any search result for ccc. I have created indexes with string value. Do i need to change anything in schema .xml ? String tag from Schema.xml : Any pointers to solve the issue? Thanks, Prerna -- View this message in context: http://www.nabble.com/Synonym--format-not-working-tp20026988p20026988.html Sent from the Solr - User mailing list archive at Nabble.com.
How to retrieve all field names of index of one type
Hi, I want to retrieve all field names of one index type, is there any way solr can do this? For example: I have 3 index with the field name and value : ProductVO I want to retrieve all other field names present in the indexes which have field name as index_type and value as "ProductVO". Please let me know if you need more details. Thanks, Prerna -- View this message in context: http://www.nabble.com/How-to-retrieve-all-field-names-of-index-of-one-type-tp19987807p19987807.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Incomplete search by using dixmasequesthandler
All these fields are dynamic fields hence we dont know names of all the fields also the number of dynamic fields is large, and we want to search for all these dynamic fields. Is there any other way of query field boosting ? prerna07 wrote: > > Hi, > > I am using dismaxrequesthandler to boost by query on the basis of fields. > There are 5 indexes which contain the search string. > > Field names which have this Searchcriteria are: > - statusName_s > - listOf_author > - prdMainTitle_s > - productDescription_s > - productURL_s > > > my query string is : > ?q=Shahrukh&qt=dismaxrequest&qf=listOf_author%5E5.0+statusName_s%5E6.0+prdMainTitle_s%5E3.0 > > I dont need any boosting for productDescription_s and productURL_s hence i > am not giving these field names the query string above. > The results I am getting from this query does not contain documents where > the searchstring is present in productDescription_s and productURL_s > fields > > Is there any configuration in solrconfig which can handle this scenario. > > Let me know if you need more information. > > Thanks, > Prerna > > > > -- View this message in context: http://www.nabble.com/Incomplete-search-by-using-dixmasequesthandler-tp19810056p19810457.html Sent from the Solr - User mailing list archive at Nabble.com.
Incomplete search by using dixmasequesthandler
Hi, I am using dismaxrequesthandler to boost by query on the basis of fields. There are 5 indexes which contain the search string. Field names which have this Searchcriteria are: - statusName_s - listOf_author - prdMainTitle_s - productDescription_s - productURL_s my query string is : ?q=Shahrukh&qt=dismaxrequest&qf=listOf_author%5E5.0+statusName_s%5E6.0+prdMainTitle_s%5E3.0 I dont need any boosting for productDescription_s and productURL_s hence i am not giving these field names the query string above. The results I am getting from this query does not contain documents where the searchstring is present in productDescription_s and productURL_s fields Is there any configuration in solrconfig which can handle this scenario. Let me know if you need more information. Thanks, Prerna -- View this message in context: http://www.nabble.com/Incomplete-search-by-using-dixmasequesthandler-tp19810056p19810056.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr search by indexes on the basis of different search fields
Can you explain more on this or forward some example of this scenario which can help us. Otis Gospodnetic wrote: > > Hi, > > You can search using different fields and you can make such clauses > required or prohibited or "should occur". > > You seem to be describing something more hierarchical, but perhaps you can > just make all clauses required. > > Otis > -- > Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch > > > > - Original Message >> From: prerna07 <[EMAIL PROTECTED]> >> To: solr-user@lucene.apache.org >> Sent: Tuesday, September 16, 2008 9:35:14 AM >> Subject: Solr search by indexes on the basis of different search fields >> >> >> We are doing serach in solr on indexes, is it possible to search on the >> basis >> of different fields. >> >> For example we have a index created with fields author, title, ISBN and >> phase. we want the search result first on the basis of author then title >> match and then ISBN. >> >> -- >> View this message in context: >> http://www.nabble.com/Solr-search-by-indexes-on-the-basis-of-different-search-fields-tp19511973p19511973.html >> Sent from the Solr - User mailing list archive at Nabble.com. > > > -- View this message in context: http://www.nabble.com/Solr-search-by-indexes-on-the-basis-of-different-search-fields-tp19511973p19525496.html Sent from the Solr - User mailing list archive at Nabble.com.
Solr search by indexes on the basis of different search fields
We are doing serach in solr on indexes, is it possible to search on the basis of different fields. For example we have a index created with fields author, title, ISBN and phase. we want the search result first on the basis of author then title match and then ISBN. -- View this message in context: http://www.nabble.com/Solr-search-by-indexes-on-the-basis-of-different-search-fields-tp19511973p19511973.html Sent from the Solr - User mailing list archive at Nabble.com.