Re: Price Range Faceting Based on Date Constraints
That's awesome! Thanks David. By the way, I own a copy of your terrific book (Solr Enterprise Search Server) and am a big fan. Alex Wang Technical Architect Crossview, Inc. C: (647) 409-3066 aw...@crossview.com On Thu, May 21, 2015 at 11:40 PM, david.w.smi...@gmail.com [via Lucene] ml-node+s472066n4207029...@n3.nabble.com wrote: Indeed: https://github.com/dsmiley/SOLR-2155 On Thu, May 21, 2015 at 8:59 PM alexw [hidden email] http:///user/SendEmail.jtp?type=nodenode=4207029i=0 wrote: Thanks David. Unfortunately we are on Solr 3.5, so I am not sure whether RPT is available. If not, is there a way to patch 3.5 to make it work? -- View this message in context: http://lucene.472066.n3.nabble.com/Price-Range-Faceting-Based-on-Date-Constraints-tp4206817p4207003.html Sent from the Solr - User mailing list archive at Nabble.com. -- If you reply to this email, your message will be added to the discussion below: http://lucene.472066.n3.nabble.com/Price-Range-Faceting-Based-on-Date-Constraints-tp4206817p4207029.html To unsubscribe from Price Range Faceting Based on Date Constraints, click here http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4206817code=YXdhbmdAY3Jvc3N2aWV3LmNvbXw0MjA2ODE3fDE4OTQ1NzE1NTI= . NAML http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- https://www.youtube.com/user/CrossViewInc1 http://www.crossview.com http://www.crossview.com https://twitter.com/CrossView_Inc https://www.youtube.com/user/CrossViewInc1 http://www.linkedin.com/company/crossview-inc./products https://plus.google.com/u/0/+Crossview/about http://blog.crossview.com This message may contain confidential and/or privileged information or information related to CrossView Intellectual Property. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -- View this message in context: http://lucene.472066.n3.nabble.com/Price-Range-Faceting-Based-on-Date-Constraints-tp4206817p4207084.html Sent from the Solr - User mailing list archive at Nabble.com.
Price Range Faceting Based on Date Constraints
Hi, I have an unique requirement to facet on product prices based on date constraints, for which I have been thinking for a solution for a couple of days now, but to no avail. The details are as follows: 1. Each product can have multiple prices, each price has a start-date and an end-date. 2. At search time, we need to facet on price ranges ($0 - $5, $5-$20, $20-$50...) 3. When faceting, a date is first determined. It can be either the current system date or a future date (call it date X) 4. For each product, the price to be used for faceting has to meet the following condition: start-date date X, and date X end-date, in other words, date X has to fall within start-date and end-date. 5. My Solr version: 3.5 Hopefully I explained the requirement clearly. I have tried single price field with multivalue and each price value has startdate and enddate appended. I also tried one field per price with the field name containing both startdate and enddate. Neither approach seems to work. Can someone please shed some light as to how the index should be designed and what the facet query should look like? Thanks in advance for your help! -- View this message in context: http://lucene.472066.n3.nabble.com/Price-Range-Faceting-Based-on-Date-Constraints-tp4206817.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Price Range Faceting Based on Date Constraints
Thanks Holger and Alessandro, SpatialRecursivePrefixTreeFieldType is a new concept to me, and I need some time to dig into it and see how it can help solve my problem. Alex Wang Technical Architect Crossview, Inc. C: (647) 409-3066 aw...@crossview.com On Thu, May 21, 2015 at 11:50 AM, Holger Rieß [via Lucene] ml-node+s472066n4206868...@n3.nabble.com wrote: Give geospatial search a chance. Use the 'SpatialRecursivePrefixTreeFieldType' field type, set 'geo' to false. The date is located on the X-axis, prices on the Y axis. For every price you get a horizontal line between start and end date. Index a rectangle with height 0.001( 1 cent) and width 'end date - start date'. Find all prices that are valid on a given day or in a given date range with the 'geofilt' function. The field type could look like (not tested): fieldType name=price_date_range class=solr.SpatialRecursivePrefixTreeFieldType geo=false distErrPct=0.025 maxDistErr=0.09 units=degrees worldBounds=1 0 366 1 / Faceting possibly can be done with a facet query for every of your price ranges. For example day 20, price range 0-5$, rectangle: field name=pdr20.0 0.0 21.0 5.0/field. Regards Holger -- If you reply to this email, your message will be added to the discussion below: http://lucene.472066.n3.nabble.com/Price-Range-Faceting-Based-on-Date-Constraints-tp4206817p4206868.html To unsubscribe from Price Range Faceting Based on Date Constraints, click here http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4206817code=YXdhbmdAY3Jvc3N2aWV3LmNvbXw0MjA2ODE3fDE4OTQ1NzE1NTI= . NAML http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- https://www.youtube.com/user/CrossViewInc1 http://www.crossview.com http://www.crossview.com https://twitter.com/CrossView_Inc https://www.youtube.com/user/CrossViewInc1 http://www.linkedin.com/company/crossview-inc./products https://plus.google.com/u/0/+Crossview/about http://blog.crossview.com This message may contain confidential and/or privileged information or information related to CrossView Intellectual Property. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -- View this message in context: http://lucene.472066.n3.nabble.com/Price-Range-Faceting-Based-on-Date-Constraints-tp4206817p4206951.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Price Range Faceting Based on Date Constraints
Hi Alex, Thanks for the link to the presentation. I am going through the slides and trying to figure out the time-sensitive search it talks about and how it relates to the problem I am facing. It looks like it tries to solve the problem of sku availability based on date, while in my case, all skus are available, but the prices are time-sensitive, and faceting logic needs to pick the right price for each sku when counting. -- View this message in context: http://lucene.472066.n3.nabble.com/Price-Range-Faceting-Based-on-Date-Constraints-tp4206817p4206856.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Price Range Faceting Based on Date Constraints
Thanks Alessandro. I am implementing this in the Hybris framework. It is not easy to create nested documents during indexing using the Hybris Solr indexer. So I am trying to avoid additional documents and cores if at all possible. -- View this message in context: http://lucene.472066.n3.nabble.com/Price-Range-Faceting-Based-on-Date-Constraints-tp4206817p4206854.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Price Range Faceting Based on Date Constraints
Thanks David. Unfortunately we are on Solr 3.5, so I am not sure whether RPT is available. If not, is there a way to patch 3.5 to make it work? -- View this message in context: http://lucene.472066.n3.nabble.com/Price-Range-Faceting-Based-on-Date-Constraints-tp4206817p4207003.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: A simple query?
Thanks but, unfortunately that will not solve the problem since it will bring back both the first and second doc. Besides, the query terms is: a b y z, not just: a b -- View this message in context: http://lucene.472066.n3.nabble.com/A-simple-query-tp3395465p3396297.html Sent from the Solr - User mailing list archive at Nabble.com.
A simple query?
Hi all, This may seem to be an easy one but I have been struggling to get it working. To simplify things, let's say I have a field that can contain any combination of the 26 alphabetic letters, space delimited: doc myfielda b/myfield /doc doc myfieldb c/myfield /doc doc myfieldx y z/myfield /doc The search term is a list of user specified letters, for exampe: a b y z I would like only the following docs to be returned: 1. Any doc that contains exactly the 4 letters a b y z (sequence not important) 2. Any docs that contains only a subset of the 4 letters a b y z (sequence not important) Note if a doc contains any letters other than the 4 letters a b y z will not qualify. So in this case, only the first doc should be returned. Can some one shed some light here and let me know how to get this working, specifically: 1. What should the field type be (text, text_ws, string...)? 2. How does the query look like? Thanks in advance! -- View this message in context: http://lucene.472066.n3.nabble.com/A-simple-query-tp3395465p3395465.html Sent from the Solr - User mailing list archive at Nabble.com.
Spellchecking in the Chinese Lanugage
Hi, I have been trying to get spellcheck to work in the Chinese language. So far I have not had any luck. Can someone shed some light here as a general guide line in terms of what need to happen? I am using the CJKAnalyzer in the text field type and searching works fine, but spelling does not work. Here are the things I have tried: 1. Put CJKAnalyzer in the textSpell field type. 2. Set the characterEncoding param to utf-8 in the spellcheck search component. 3. Using Luke, I can see the Chinese characters in the spell field in the main index. 4. After building the spelling index, I don't see Chinese characters in the spellchecker index, only terms in English. 5. Tried adding the NGramFilterFactory to the CJKAnalyzer with no luck either. Thanks! -- View this message in context: http://lucene.472066.n3.nabble.com/Spellchecking-in-the-Chinese-Lanugage-tp2812726p2812726.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Spellchecking in the Chinese Lanugage
Thanks Otis and Luke. Yes it does make sense to spellcheck phrases in Chinese. Looks like the default Solr spellCheck component is already doing some kind of NGram-ing. When examining the spellCheck index, I did see gram1, gram2, gram3, gram4... The problem is no Chinese terms were indexed into the spellChecker index, only English terms. Regards, Alex -- View this message in context: http://lucene.472066.n3.nabble.com/Spellchecking-in-the-Chinese-Lanugage-tp2812726p2813149.html Sent from the Solr - User mailing list archive at Nabble.com.
Special characters during indexing and searching
Hi, I have a field named productName in my schema which uses the standard text field type. And one of my product name is star/bit. When I search for star/bit (without quotes) using the dismax request hander, NO results was found. After some research, looks like during indexing, star/bit was tokenized into star, bit and starbit by the WordDelimiterFilterFactory. And at search time, star/bit (without quotes) was turned into a star bit phrase query, therefore no matches since there is no star bit phrase in the index. My question is: 1. Am I understanding it correctly? If yes, how can I make sure a match can be found? If not, what's really happening? 2. Why does dismax turn star/bit into a star bit phrase search instead of searching for star or bit or starbit? Thanks for your help! Alex -- View this message in context: http://lucene.472066.n3.nabble.com/Special-characters-during-indexing-and-searching-tp2795914p2795914.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Special characters during indexing and searching
Thanks Erick. Here is the Solr response with debug on. The productName IS in the qf parameter in dismax. I have also pasted my dismax definition and the text field type definition: − 0 47 − on on 0 bit/star dismax 10 2.2 − − bit/star bit/star bit/star − +DisjunctionMaxQuery((longDesc:bit star | shortDesc:bit star^1.2 | productName:bit star^10.0)~0.01) DisjunctionMaxQuery((longDesc:bit star~10^5.0 | shortDesc:bit star~10^6.0 | productName:bit star~10^50.0)~0.01) − +(longDesc:bit star | shortDesc:bit star^1.2 | productName:bit star^10.0)~0.01 (longDesc:bit star~10^5.0 | shortDesc:bit star~10^6.0 | productName:bit star~10^50.0)~0.01 DisMaxQParser − 15.0 − 0.0 − 0.0 − 0.0 − 0.0 − 0.0 − 0.0 − 0.0 − 0.0 − 0.0 − 15.0 − 15.0 − 0.0 − 0.0 − 0.0 − 0.0 − 0.0 − 0.0 − 0.0 = Dismax Definition: dismax explicit 0.01 productName^10 shortDesc^1.2 longDesc^1.0 productName^50 shortDesc^6.0 longDesc^5.0 productName,shortDesc,thumbnail 3lt;75% 10 *:* text features name 0 name regex elevator spellcheck = text field type definition: -- View this message in context: http://lucene.472066.n3.nabble.com/Special-characters-during-indexing-and-searching-tp2795914p2796760.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Special characters during indexing and searching
I am using Nabble to view the thread, and the format seems to be ok: http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=replynode=2796849 1 what version of Solr. Solr 1.4 2 have you looked in your index (admin page and/or luke) to see if what you have indexed there is what you think you have indexed there? Yes. When I search for bit only, I get 3 results as follows: − 0 15 − on productName on 0 bit dismax 10 2.2 − − bit/star − bit/star − bit/star 3 What happens if you just query for the raw phrase, q=productName:bit star~3 or something? This is the response: − 0 0 − on 0 productName:bit star~3 10 2.2 -- View this message in context: http://lucene.472066.n3.nabble.com/Special-characters-during-indexing-and-searching-tp2795914p2797097.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Special characters during indexing and searching
Sorry wrong link to the thread, here is the correct one: http://lucene.472066.n3.nabble.com/Special-characters-during-indexing-and-searching-td2795914.html -- View this message in context: http://lucene.472066.n3.nabble.com/Special-characters-during-indexing-and-searching-tp2795914p2797158.html Sent from the Solr - User mailing list archive at Nabble.com.
CJKAnalyzer and Synonyms
Hi everyone, I am trying to get Synonyms working with CJKAnalyzer. Search works fine but synonyms do not work as expected. Here is my field definition in the schema file: fieldType name=cjk class=solr.TextField analyzer class=org.apache.lucene.analysis.cjk.CJKAnalyzer filter class=solr.SynonymFilterFactory synonyms=synonyms.txt ignoreCase=true expand=true/ /analyzer /fieldType When testing on the analysis page, the synonym filter does not kick in at all. My question is: What am I doing wrong and what is the proper way of defining the field type? Thanks in advance for your help! Alex -- View this message in context: http://lucene.472066.n3.nabble.com/CJKAnalyzer-and-Synonyms-tp2510104p2510104.html Sent from the Solr - User mailing list archive at Nabble.com.