Re: While creating collection in SolrCloud can we manually select machines(nodes)
Yes, the Solr Collections API allows you to pass in a set of explicit nodes (subset of the complete list of nodes in your cluster) to setup your Collection. This the createNodeSet input parameter in the CREATE COLLECTION API - described as follows in the documentation: Allows defining the nodes to spread the new collection across. If not provided, the CREATE operation will create shard-replica spread across all live Solr nodes. The format is a comma-separated list of node_names, such as localhost:8983_solr,localhost:8984_solr,localhost:8985_solr. -- View this message in context: http://lucene.472066.n3.nabble.com/While-creating-collection-in-SolrCloud-can-we-manually-select-machines-nodes-tp4144593p4144614.html Sent from the Solr - User mailing list archive at Nabble.com.
How to sort value that numeric mix alpha
Dear all, Could anybody suggest me how to sort the field that has numeric mix with alpha. In my case I have field name 'product_id' which contain value like C1,C2,C3,C4,C9,C12,C23,C50 when I try to sort (DESC) it return wrong result something like this C9,C50,C4,C3,C23,C2,C12,C1 As you see I have 'C' for prefix. So, In my Schema.xml I have tried this... fieldType name=alphaOnlySort class=solr.TextField sortMissingLast=true omitNorms=true analyzer tokenizer class=solr.KeywordTokenizerFactory/ filter class=solr.LowerCaseFilterFactory / filter class=solr.TrimFilterFactory / filter class=solr.PatternReplaceFilterFactory pattern=([^a-z]) replacement= replace=all / /analyzer /fieldType field name=pid_sort type=alphaOnlySort indexed=true stored=true / copyField source=product_id dest=pid_sort/ but it didn't work. How to deal with this? Thank you very much, Chun. -- View this message in context: http://lucene.472066.n3.nabble.com/How-to-sort-value-that-numeric-mix-alpha-tp4144615.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: How to sort value that numeric mix alpha
Try indexing your data as follows: C01,C02,C03,C04,C09,C12,C23,C50 instead of C1,C2,C3,C4,C9,C12,C23,C50 and the sort order would work correctly. BTW, what you are describing as an issue is NOT unique to Solr. The same happens on regular Databases as well. Google up how database type systems perform alphanumeric sorts - and you'll know why. -- View this message in context: http://lucene.472066.n3.nabble.com/How-to-sort-value-that-numeric-mix-alpha-tp4144615p4144616.html Sent from the Solr - User mailing list archive at Nabble.com.
Any way to parse timestamp into a date field
Hello, My data comes with the timestamp 12345654. I want that indexed as a date. It does not seem to be happening with default date type and none of the URPs seem to recognize that format. Is there something terribly obvious I am missing? Regards, Alex. Personal website: http://www.outerthoughts.com/ Current project: http://www.solr-start.com/ - Accelerating your Solr proficiency
Re: Any way to parse timestamp into a date field
If you're using Solrj then you can just add the Date object to SolrInputDocument and everything will be taken care of. But if you are directly uploading data with a date like that then the only option is to use a ScriptUpdateProcessor to convert the long to a java Date. On Sun, Jun 29, 2014 at 4:00 PM, Alexandre Rafalovitch arafa...@gmail.com wrote: Hello, My data comes with the timestamp 12345654. I want that indexed as a date. It does not seem to be happening with default date type and none of the URPs seem to recognize that format. Is there something terribly obvious I am missing? Regards, Alex. Personal website: http://www.outerthoughts.com/ Current project: http://www.solr-start.com/ - Accelerating your Solr proficiency -- Regards, Shalin Shekhar Mangar.
RE: While creating collection in SolrCloud can we manually select machines(nodes)
Check this article: SolrCloud - Assigning Nodes To Machines by Erick Erickson. He explains how to do this step by step: http://heliosearch.org/solrcloud-assigning-nodes-machines/ -Original Message- From: vidit.asthana [mailto:vidit.astha...@gmail.com] Sent: Saturday, June 28, 2014 5:09 PM To: solr-user@lucene.apache.org Subject: While creating collection in SolrCloud can we manually select machines(nodes) I have a 4 machine cluster. I want to create a collection with 1 shard and 1 replica. So I only need 2 machines. Is there a way I can explicitly define the machines on which my new collection should be created. -- View this message in context: http://lucene.472066.n3.nabble.com/While-creating-collection-in-SolrCloud-ca n-we-manually-select-machines-nodes-tp4144593.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Any way to parse timestamp into a date field
It would be nice to have unformatted or timestamp or long (maybe all three) as an accepted format for the parse date update processor. Seems like a reasonable use case. But... the standard use of parsing is to chain the types in a hierarchy, with date and then numbers, so that would cause the date update processor to gobble up plain numbers since that processing is not based on actual schema field type. So, what is really needed is for TrieDateField itself to recognize a pure numeric as a timestamp. My personal preference would be for TrieDateField to support all the common date formats anyway, eliminating the need for the parse date update processor - a Solr band-aid to cover the weakness of the Lucene feature. -- Jack Krupansky -Original Message- From: Shalin Shekhar Mangar Sent: Sunday, June 29, 2014 6:43 AM To: solr-user@lucene.apache.org Subject: Re: Any way to parse timestamp into a date field If you're using Solrj then you can just add the Date object to SolrInputDocument and everything will be taken care of. But if you are directly uploading data with a date like that then the only option is to use a ScriptUpdateProcessor to convert the long to a java Date. On Sun, Jun 29, 2014 at 4:00 PM, Alexandre Rafalovitch arafa...@gmail.com wrote: Hello, My data comes with the timestamp 12345654. I want that indexed as a date. It does not seem to be happening with default date type and none of the URPs seem to recognize that format. Is there something terribly obvious I am missing? Regards, Alex. Personal website: http://www.outerthoughts.com/ Current project: http://www.solr-start.com/ - Accelerating your Solr proficiency -- Regards, Shalin Shekhar Mangar.
How to setup solr on the server
Hi, I have solr ready and configured and is running on my local machine.but now i want to upload my solr to the server. How do i do that and what are the things i need to keep in mind.Plus i also need to know how to configure a cron job i searched on the net and came up with this command,will this work fine on a linux server. 'http://localhost:8983/solr/db/dataimport?command=delta-import' The server that iam trying to upload solr to is a linux machine(debian). -- Regards Madhav Bahuguna
Re: how to log ngroups
Any help here? With Regards Aman Tandon On Thu, Jun 26, 2014 at 7:32 PM, Aman Tandon amantandon...@gmail.com wrote: Hi, I am grouping in my results and also applying the group limit. Is there is any way to log the ngroups as well along with hits.
Re: How to sort value that numeric mix alpha
I think you wanted to remove letters, but your pattern removes NON-letters - that's what the ^ does, negation. So, try: =[a-z]. You can also get rid of the lower case filter and just use [a-zA-Z]. -- Jack Krupansky -Original Message- From: rachun Sent: Sunday, June 29, 2014 3:19 AM To: solr-user@lucene.apache.org Subject: How to sort value that numeric mix alpha Dear all, Could anybody suggest me how to sort the field that has numeric mix with alpha. In my case I have field name 'product_id' which contain value like C1,C2,C3,C4,C9,C12,C23,C50 when I try to sort (DESC) it return wrong result something like this C9,C50,C4,C3,C23,C2,C12,C1 As you see I have 'C' for prefix. So, In my Schema.xml I have tried this... fieldType name=alphaOnlySort class=solr.TextField sortMissingLast=true omitNorms=true analyzer tokenizer class=solr.KeywordTokenizerFactory/ filter class=solr.LowerCaseFilterFactory / filter class=solr.TrimFilterFactory / filter class=solr.PatternReplaceFilterFactory pattern=([^a-z]) replacement= replace=all / /analyzer /fieldType field name=pid_sort type=alphaOnlySort indexed=true stored=true / copyField source=product_id dest=pid_sort/ but it didn't work. How to deal with this? Thank you very much, Chun. -- View this message in context: http://lucene.472066.n3.nabble.com/How-to-sort-value-that-numeric-mix-alpha-tp4144615.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: How to setup solr on the server
It is as simple as on your local just push the same setup as local to the live server(if you are not using the solr in cloud mode). All you need to take care of the garbage collection, you can read some wiki of Solr on Performance Tuning, it might help. With Regards Aman Tandon On Sun, Jun 29, 2014 at 8:02 PM, madhav bahuguna madhav.bahug...@gmail.com wrote: Hi, I have solr ready and configured and is running on my local machine.but now i want to upload my solr to the server. How do i do that and what are the things i need to keep in mind.Plus i also need to know how to configure a cron job i searched on the net and came up with this command,will this work fine on a linux server. 'http://localhost:8983/solr/db/dataimport?command=delta-import' The server that iam trying to upload solr to is a linux machine(debian). -- Regards Madhav Bahuguna
Re: Streaming large updates with SolrJ
Now that I think about it, though, is there a way to use the Update Xml messages with something akin to the cloud solr server? I only see examples posting to actual Solr instances, but we really need to be able to take advantage of the zookeepers to send our updates to the appropriate servers. Thanks, Joe On Sat, Jun 28, 2014 at 5:17 PM, Joe Gresock jgres...@gmail.com wrote: Yeah, I think that's what I'll have to do, Mikhail. I was just testing the waters to see if there was a way to do it with SolrJ. On Sat, Jun 28, 2014 at 4:11 PM, Mikhail Khludnev mkhlud...@griddynamics.com wrote: Joe, if the heap is so tight, couldn't you post http://wiki.apache.org/solr/UpdateXmlMessages by own optimized code? On Sat, Jun 28, 2014 at 3:13 AM, Joe Gresock jgres...@gmail.com wrote: Is there a standard way to stream updates to Solr using SolrJ? Specifically, we have some atomic updates for large field values (hundreds of MB) we'd like to send. We're currently sending partial updates using SolrInputDocument objects, but we'd love to be able to keep less on the heap in our client code. Thanks, Joe -- I know what it is to be in need, and I know what it is to have plenty. I have learned the secret of being content in any and every situation, whether well fed or hungry, whether living in plenty or in want. I can do all this through him who gives me strength.*-Philippians 4:12-13* -- Sincerely yours Mikhail Khludnev Principal Engineer, Grid Dynamics http://www.griddynamics.com mkhlud...@griddynamics.com -- I know what it is to be in need, and I know what it is to have plenty. I have learned the secret of being content in any and every situation, whether well fed or hungry, whether living in plenty or in want. I can do all this through him who gives me strength.*-Philippians 4:12-13* -- I know what it is to be in need, and I know what it is to have plenty. I have learned the secret of being content in any and every situation, whether well fed or hungry, whether living in plenty or in want. I can do all this through him who gives me strength.*-Philippians 4:12-13*
Multiterm analysis in complexphrase query
I've been using a modified version of the complex phrase query parser patch from https://issues.apache.org/jira/browse/SOLR-1604 in Solr 3.6, and I'm currently upgrading to 4.9, which has this built-in. I'm having trouble with using accents in wildcard queries, support for which was added in https://issues.apache.org/jira/browse/SOLR-2438. In 3.6, I was using a modified version of SolrQueryParser, which simply used ComplexPhraseQueryParser in place of QueryParser. In the version of ComplexPhraseQParserPlugin in 4.9, it just directly uses ComplexPhraseQueryParser, and doesn't go through SolrQueryParser at all. SolrQueryParserBase.analyzeIfMultitermTermText() is where the multiterm analysis magic happens. So, my problem is that ComplexPhraseQParserPlugin/ComplexPhraseQueryParser doesn't use SolrQueryParserBase, which breaks doing fun things like this: {!complexPhrase}barac* óba*a And expecting it to match Barack Obama. Anyone run into this before, or have a way to get this working? -Michael
How to integrate nlp in solr
Hi, I want to process the natural language and want to gave back the appropriate results back to client, how can i configure my solr to achieve this. I read so many blogs out there everybody is just discussing how better results they are providing now but nobody provide a good demo of this. If there is any NLP guy please help me out here. I will really be thankful to you for this. With Regards Aman Tandon
Re: Streaming large updates with SolrJ
Joe, Looking at CloudSolrServer we can see how challenging it could be. I can suggest just a clue - you can extend BinaryResponseParser and make it lazy, that's what you need. Then, you can set to for LBHttpSolrServer, and pass it into CloudSolrServer. Wish you a good journey! On Sun, Jun 29, 2014 at 7:09 PM, Joe Gresock jgres...@gmail.com wrote: Now that I think about it, though, is there a way to use the Update Xml messages with something akin to the cloud solr server? I only see examples posting to actual Solr instances, but we really need to be able to take advantage of the zookeepers to send our updates to the appropriate servers. Thanks, Joe On Sat, Jun 28, 2014 at 5:17 PM, Joe Gresock jgres...@gmail.com wrote: Yeah, I think that's what I'll have to do, Mikhail. I was just testing the waters to see if there was a way to do it with SolrJ. On Sat, Jun 28, 2014 at 4:11 PM, Mikhail Khludnev mkhlud...@griddynamics.com wrote: Joe, if the heap is so tight, couldn't you post http://wiki.apache.org/solr/UpdateXmlMessages by own optimized code? On Sat, Jun 28, 2014 at 3:13 AM, Joe Gresock jgres...@gmail.com wrote: Is there a standard way to stream updates to Solr using SolrJ? Specifically, we have some atomic updates for large field values (hundreds of MB) we'd like to send. We're currently sending partial updates using SolrInputDocument objects, but we'd love to be able to keep less on the heap in our client code. Thanks, Joe -- I know what it is to be in need, and I know what it is to have plenty. I have learned the secret of being content in any and every situation, whether well fed or hungry, whether living in plenty or in want. I can do all this through him who gives me strength.*-Philippians 4:12-13* -- Sincerely yours Mikhail Khludnev Principal Engineer, Grid Dynamics http://www.griddynamics.com mkhlud...@griddynamics.com -- I know what it is to be in need, and I know what it is to have plenty. I have learned the secret of being content in any and every situation, whether well fed or hungry, whether living in plenty or in want. I can do all this through him who gives me strength.*-Philippians 4:12-13* -- I know what it is to be in need, and I know what it is to have plenty. I have learned the secret of being content in any and every situation, whether well fed or hungry, whether living in plenty or in want. I can do all this through him who gives me strength.*-Philippians 4:12-13* -- Sincerely yours Mikhail Khludnev Principal Engineer, Grid Dynamics http://www.griddynamics.com mkhlud...@griddynamics.com
Re: Endeca to Solr Migration
Thanks Mikhail. In your opinion, is this something that be done in 4-6 months? -- View this message in context: http://lucene.472066.n3.nabble.com/Endeca-to-Solr-Migration-tp4144582p4144664.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Endeca to Solr Migration
Yes. I think so, but the scope seems challenging. On Sun, Jun 29, 2014 at 10:13 PM, mrg81 maya...@gmail.com wrote: Thanks Mikhail. In your opinion, is this something that be done in 4-6 months? -- View this message in context: http://lucene.472066.n3.nabble.com/Endeca-to-Solr-Migration-tp4144582p4144664.html Sent from the Solr - User mailing list archive at Nabble.com. -- Sincerely yours Mikhail Khludnev Principal Engineer, Grid Dynamics http://www.griddynamics.com mkhlud...@griddynamics.com
SlowFuzzySearch
Hi guys I know that Solr now has a fast Fuzzy Search capability for levenshtein distances of up to 2, but I would like to use distances of 3 or 4 (up to half the word length if possible). I have been told it is possible to use an older fuzzy search version called SlowFuzzyQuery but I am not sure how to use it. I realise it will be slow(er) but my database will be reasonably small and I would like to test out the performance to see if it is a feasible option. Is it still part of the Solr code or must I install it separately? Any examples of its usage? And for distances of 2 or less does it actually perform a fast fuzzy search or must I revert to using the ~ syntax for those faster fuzzy searches? All help appreciated. Michael
Re: How to integrate nlp in solr
On Sun, Jun 29, 2014 at 10:19 PM, Aman Tandon amantandon...@gmail.com wrote: the appropriate results What are those specifically? You need to be a bit more precise about what you are trying to achieve. Otherwise, there are too many NLP branches and too many approaches. Regards, Alex. Personal website: http://www.outerthoughts.com/ Current project: http://www.solr-start.com/ - Accelerating your Solr proficiency
Re: What are the pros and cons Having More Replica at SolrCloud
Thanks Tim for your nice explanation. It helps me a lot. Sincerely, Binh
Re: How to sort value that numeric mix alpha
Thank you for both of you I finally re-index data and remove 'C' and index only numeric. So, that the way I fix my problem. Best, Chun. -- View this message in context: http://lucene.472066.n3.nabble.com/How-to-sort-value-that-numeric-mix-alpha-tp4144615p4144693.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: CollapsingQParserPlugin throws Exception when useFilterForSortedQuery=true
Hi Joel, Thanks a lot for clarification .. An error message would indeed be a good thing .. Should I open a jira item for same ? On 28 June 2014 19:08, Joel Bernstein joels...@gmail.com wrote: OK, I see the problem. When you use useFilterForSortedQuery true /useFilterForSortedQuery Solr builds a docSet in a way that seems to be incompatible with the CollapsingQParserPlugin. With useFilterForSortedQuery true /useFilterForSortedQuery, Solr doesn't run the main query again when collecting the DocSet. The getDocSetScore() method is expecting the main query to present, because the CollapsingQParserPlugin may need the scores generated from the main query, to select the group head. I think trying to make useFilterForSortedQuery true /useFilterForSortedQuery compatible with CollapsingQParsePlugin is probably not possible. So, a nice error message would be a good thing. Joel Bernstein Search Engineer at Heliosearch On Tue, Jun 24, 2014 at 3:31 AM, Umesh Prasad umesh.i...@gmail.com wrote: Hi , Found another bug with CollapsignQParserPlugin. Not a critical one. It throws an exception when used with useFilterForSortedQuery true /useFilterForSortedQuery Patch attached (against 4.8.1 but reproducible in other branches also) 518 T11 C0 oasc.SolrCore.execute [collection1] webapp=null path=null params={q=*%3A*fq=%7B%21collapse+field%3Dgroup_s%7DdefType=edismaxbf=field%28test_ti%29} hits=2 status=0 QTime=99 4557 T11 C0 oasc.SolrCore.execute [collection1] webapp=null path=null params={q=*%3A*fq=%7B%21collapse+field%3Dgroup_s+nullPolicy%3Dexpand+min%3Dtest_tf%7DdefType=edismaxbf=field%28test_ti%29sort=} hits=4 status=0 QTime=15 4587 T11 C0 oasc.SolrException.log ERROR java.lang.UnsupportedOperationException: Query does not implement createWeight at org.apache.lucene.search.Query.createWeight(Query.java:80) at org.apache.lucene.search.IndexSearcher.createNormalizedWeight(IndexSearcher.java:684) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297) at org.apache.solr.search.SolrIndexSearcher.getDocSetScore(SolrIndexSearcher.java:879) at org.apache.solr.search.SolrIndexSearcher.getDocSet(SolrIndexSearcher.java:902) at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1381) at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:478) at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:461) at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1952) at org.apache.solr.util.TestHarness.query(TestHarness.java:295) at org.apache.solr.util.TestHarness.query(TestHarness.java:278) at org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:676) at org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:669) at org.apache.solr.search.TestCollapseQParserPlugin.testCollapseQueries(TestCollapseQParserPlugin.java:106) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1618) at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:827) at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:863) at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:877) at com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule$1.evaluate(SystemPropertiesRestoreRule.java:53) at org.apache.lucene.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:50) at org.apache.lucene.util.TestRuleFieldCacheSanity$1.evaluate(TestRuleFieldCacheSanity.java:51) at org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:46) at com.carrotsearch.randomizedtesting.rules.SystemPropertiesInvariantRule$1.evaluate(SystemPropertiesInvariantRule.java:55) at org.apache.lucene.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:49) at org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:65) at org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:48) at