Is it possible to facet on date fields and aggregate by day/month/year?
Hi, If my data includes: doc1: date_f: 2014-05-01T00:00:00Z doc2: date_f: 2014-05-02T00:00:00Z doc2: date_f: 2014-06-01T00:00:00Z doc2: date_f: 2014-07-01T00:00:00Z then I can facet on month(date_f) and get 05(2) 06(1) 07(1) or facet on year(date_f) and get 2014(4) Is it supported? -- View this message in context: http://lucene.472066.n3.nabble.com/Is-it-possible-to-facet-on-date-fields-and-aggregate-by-day-month-year-tp4169366.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: fl rename of unique key in solrcloud
Thx Jeon. That worked. Now both the fields are returned in the response. Its a bit inefficient but works neverthless. Suchi On Sat, Nov 15, 2014 at 10:44 PM, Jeon Woosung jeonwoos...@gmail.com wrote: I guess that I caused by shard which return renamed field. following code is source code of solr 4.6 === 986:if ((sreq.purpose ShardRequest.PURPOSE_GET_FIELDS) != 0) { 987: boolean returnScores = (rb.getFieldFlags() SolrIndexSearcher.GET_SCORES) != 0; 988: 989: assert(sreq.responses.size() == 1); 990: ShardResponse srsp = sreq.responses.get(0); 991: SolrDocumentList docs = (SolrDocumentList)srsp.getSolrResponse().getResponse().get(response); 992: 993: String keyFieldName = rb.req.getSchema().getUniqueKeyField().getName(); 994: boolean removeKeyField = !rb.rsp.getReturnFields().wantsField(keyFieldName); 995: 996: for (SolrDocument doc : docs) { 997:Object id = doc.getFieldValue(keyFieldName); 998:ShardDoc sdoc = rb.resultIds.get(id.toString()); If each shard return renamed field name instead of keyFieldName(UniqueKey), id of 998 line could be null. Because the doc of 996 line wouldn't have keyFieldName So if you are urgent or you can not wait for patch, you can add unique field like this. eg) http:// host_name/solr/collection_name/select?q=dressfl=a1:p1fl=p1 On Sat, Nov 15, 2014 at 11:26 PM, Garth Grimm garthgr...@averyranchconsulting.com wrote: https://issues.apache.org/jira/browse/SOLR-6744 created. And hopefully correctly, since that’s my first. On Nov 15, 2014, at 9:12 AM, Garth Grimm garthgr...@averyranchconsulting.commailto: garthgr...@averyranchconsulting.com wrote: I see the same issue on 4.10.1. I’ll open a JIRA if I don’t see one. I guess the best immediate work around is to copy the unique field, and use that field for renaming? On Nov 15, 2014, at 3:18 AM, Suchi Amalapurapu su...@bloomreach.com mailto:su...@bloomreach.com wrote: Solr version:4.6.1 On Sat, Nov 15, 2014 at 12:24 PM, Jeon Woosung jeonwoos...@gmail.com mailto:jeonwoos...@gmail.com wrote: Could you let me know version of the solr? On Sat, Nov 15, 2014 at 5:05 AM, Suchi Amalapurapu su...@bloomreach.com mailto:su...@bloomreach.com wrote: Hi Getting the following exception when using fl renaming with unique key in the schema. http://host_name/solr/collection_name/select?q=dressfl=a1:p1 where p1 is the unique key for collection_name For collections with single shard, this works flawlessly but results in the following exception in case of multiple shards. How do we fix this? Stack trace below. Suchi error: {trace: java.lang.NullPointerException\n\tat org.apache.solr.handler.component.QueryComponent.returnFields(QueryComponent.java:998)\n\tat org.apache.solr.handler.component.QueryComponent.handleRegularResponses(QueryComponent.java:653)\n\tat org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:628)\n\tat org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:311)\n\tat org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)\n\tat org.apache.solr.core.SolrCore.execute(SolrCore.java:1859)\n\tat org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:721)\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:417)\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:201)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)\n\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)\n\tat org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)\n\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)\n\tat
Re: solr IRC
On 11/15/2014 10:12 PM, Anurag Sharma wrote: Thanks a lot Shawn for the detailed explanation. The wiki is also very helpful. Any recommended client like pidgin, adium etc. especially for windows. The last time I used IRC from a Windows machine (which was a long time ago), I used mIRC. These days I use irssi inside screen on a Linux machine. Thanks, Shawn
Re: Is it possible to facet on date fields and aggregate by day/month/year?
Look at the range faceting stuff. It lets you specify a start date, end date and gap. And you can get results for multiple instances on the same field. So you could specify one set of parameters for date_f where the gap was +1MONTH and another on date_f was +1YEAR. See: https://cwiki.apache.org/confluence/display/solr/Faceting#Faceting-RangeFaceting Best, Erick On Sun, Nov 16, 2014 at 12:38 AM, adfel70 adfe...@gmail.com wrote: Hi, If my data includes: doc1: date_f: 2014-05-01T00:00:00Z doc2: date_f: 2014-05-02T00:00:00Z doc2: date_f: 2014-06-01T00:00:00Z doc2: date_f: 2014-07-01T00:00:00Z then I can facet on month(date_f) and get 05(2) 06(1) 07(1) or facet on year(date_f) and get 2014(4) Is it supported? -- View this message in context: http://lucene.472066.n3.nabble.com/Is-it-possible-to-facet-on-date-fields-and-aggregate-by-day-month-year-tp4169366.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Hierarchical faceting
Thank you Evan and Oleg. This is exactly what I had implemented (Option 2). My issue is Evan Pease wrote Then, in your Solr query, you can simply add: facet=true facet.field=category You should see a facet that contains each level of the taxonomy with counts. As you mentioned, we get each level of the taxonomy while I'd like to do drill down query. For example, if the Solr query was: facet=true facet.field=category My intention is to get just the first level as results: NonFic (8) Fic (3) Then if user clicks on 'NonFic' in UI, we want to fetch only the next immediate level: NonFic Hist (2) Sci (6) Then if user clicks on 'Sci' in UI, we want to fetch only the next immediate level: NonFic Sci Phy(4) Chem(1) Math(1) Myabe I can still use PathHierarchyTokenizer, but could you let me know how to form my facet query to fetch the results one level at a time. Thanks! -- View this message in context: http://lucene.472066.n3.nabble.com/Hierarchical-faceting-tp4169263p4169413.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Hierarchical faceting
Would this approach be an answer? https://lucidworks.com/blog/easy-hierarchical-faceting-and-display-with-solr-and-jquery-and-a-tiny-bit-of-python/ Regards, Alex. Personal: http://www.outerthoughts.com/ and @arafalov Solr resources and newsletter: http://www.solr-start.com/ and @solrstart Solr popularizers community: https://www.linkedin.com/groups?gid=6713853 On 16 November 2014 20:36, rashmy1 rashmy.appanerava...@siemens.com wrote: Thank you Evan and Oleg. This is exactly what I had implemented (Option 2). My issue is Evan Pease wrote Then, in your Solr query, you can simply add: facet=true facet.field=category You should see a facet that contains each level of the taxonomy with counts. As you mentioned, we get each level of the taxonomy while I'd like to do drill down query. For example, if the Solr query was: facet=true facet.field=category My intention is to get just the first level as results: NonFic (8) Fic (3) Then if user clicks on 'NonFic' in UI, we want to fetch only the next immediate level: NonFic Hist (2) Sci (6) Then if user clicks on 'Sci' in UI, we want to fetch only the next immediate level: NonFic Sci Phy(4) Chem(1) Math(1) Myabe I can still use PathHierarchyTokenizer, but could you let me know how to form my facet query to fetch the results one level at a time. Thanks! -- View this message in context: http://lucene.472066.n3.nabble.com/Hierarchical-faceting-tp4169263p4169413.html Sent from the Solr - User mailing list archive at Nabble.com.
Can I be added to the Wiki contributors group?
I mean for: https://wiki.apache.org/solr/FrontPage My username is XavierMorera Regards, Xavier -- *Xavier Morera* Entrepreneur | Author Trainer | Consultant | Developer Scrum Master *www.xaviermorera.com http://www.xaviermorera.com/* office: (305) 600-4919 cel: +506 8849-8866 skype: xmorera Twitter https://twitter.com/xmorera | LinkedIn https://www.linkedin.com/in/xmorera | Pluralsight Author http://www.pluralsight.com/author/xavier-morera