Re: Issue when zookeeper session expires during shard leader election.
Hi Mike, Yes, please open a new Jira issue and attach your patch there. We can discuss more on the issue. On Tue, Jul 28, 2015 at 11:40 AM, Michael Roberts wrote: > Hey, > > I am encountering an issue which looks a lot like > https://issues.apache.org/jira/browse/SOLR-6763. > > However, it seems like the fix for that does not address the entire problem. > That fix will only work if we hit the zkClient.getChildren() call before the > reconnect logic has finished reconnecting us to ZooKeeper (I can reproduce > scenarios where it doesn’t in 4.10.4). If the reconnect has already happened, > we won’t get the session timeout exception. > > The specific problem I am seeing is slightly different SOLR-6763, but the > root cause appears to be the same. The issue that I am seeing is; during > startup the collections are registered and there is one > coreZkRegister-1-thread-* per collection. The elections are started on this > thread, the /collections//leader_elect ZNodes are created, and then the > thread blocks waiting for the peers to become available. During the block the > ZooKeeper session times out. > > Once we finish blocking, the reconnect logic calls register() for each > collection, which restarts the election process (although serially this > time). At a later point, we can have two threads that are trying to register > the same collection. > > This is incorrect, because the coreZkRegister-1-thread-’s are assuming they > are leader with no verification from zookeeper. The ephemeral leader_elect > nodes they created were removed when the session timed out. If another host > started in the interim (or any point after that actually), it would see no > leader, and would attempt to become leader of the shard itself. This leads to > some interesting race conditions, where you can end up with two leaders for a > shard. > > It seems like a more complete fix would be to actually close the > ElectionContext upon reconnect. This would break us out of the wait for peers > loop, and stop the threads from processing the rest of the leadership logic. > The reconnection logic would then continue to call register() again for each > Collection, and if the ZK state indicates it should be leader it can re-run > the leadership logic. > > I have a patch in testing that does this, and I think addresses the problem. > > What is the general process for this? I didn’t want to reopen a close Jira > item. Should I create a new one so the issue and the proposed fix can be > discussed? > > Thanks. > > Mike. > > -- Regards, Shalin Shekhar Mangar.
Re: Quantity wise price searching in Apache SOLR
As a first sight this is a nested object problem. Your quantity - price is nested object, child of the Product . Different approaches can fit with this requirements. What I would suggest is to give a look so Solr/Lucene Join. Let's take a quick overview of nested objects in Solr : 1) custom serialization : you can manually serialise the nested objects in one Solr field. You will need to manage the serialisation at Indexing time and a proper search at query time. Can be error prone. This was the only approach pre-join . 2) Query time join - you don't follow any particular indexing strategy - you pay this with slowest query time performances. The join will happen query time, you will be able to query on children ( stock with prices) and retrieve parents ( products) and viceversa. The Join will happen at query time. 3) Index time Join ( Alias Block Join) - it's faster, you need to build blocks at indexing time ( which means you need to index in a block all the children and the parent in the end) . If you need to change a child in the block, you will be to re-index the whole block. You have benefit at query time. Nested objects modelling allow you to search in children and get parents, the viceversa, calculate nested facets and go to any nesting level. For sorting, you can not sort on multi valued fields, i.e. duplicating the price data will not work in the product. You should proceed sorting on the children. Take extra care to the scoring model for the Join, in the past only NONE was supported ( i.e. you filter based on children, you don't score based on children) . Cheers 2015-07-28 7:34 GMT+01:00 unique.jim...@gmail.com : > Currently I am working on e-commerce website where price can be vary based > on > quantity. > > For e.g > > Product A > --- > Quantity | 25 | 50 | 70 | 90+ | > --- > Price| 0.76 | 0.79 | 0.65 | 0.60 | > --- > > Product B > --- > Quantity | 25 | 40 | 65 | 80+ | > --- > Price| 0.81 | 0.73 | 0.62 | 0.60 | > --- > > Please note that quantity break will be different for one and another > product. > > How I should save into solr so it fulfill following criteria. > > -If user search for desired quantity, system should pick price from that > quantity range. If User search for 60 then system should show 0.65 for > "Product A" and 0.62 for "Product B" > -Also user selects desired quantity and sort by price "lowest to highest" > It > should match the price where selected quantity falls. If user search for > quantity 60 then "Product B"(0.62) should be first and "Product A"(0.65) > should be second. > -If user sort "lowest to highest" without selecting quantity then system > show show "Product A" should be first and "Product B" should be second as > Product A (0.76) has lowest price than Product B(0.81) > > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Quantity-wise-price-searching-in-Apache-SOLR-tp4219406.html > Sent from the Solr - User mailing list archive at Nabble.com. > -- -- Benedetti Alessandro Visiting card - http://about.me/alessandro_benedetti Blog - http://alexbenedetti.blogspot.co.uk "Tyger, tyger burning bright In the forests of the night, What immortal hand or eye Could frame thy fearful symmetry?" William Blake - Songs of Experience -1794 England
Re: Solr Cloud: Duplicate documents in multiple shards
Thanks Erick. We could not recollect what could have happened in between.. Yes. We are seeing the same document in 2 shards. "Uniquefiled" is set as uuid in schema and declared as String. Will go with reindexing. schema.xml : Query: http://localhost:1004/solr/collection1/select?q=id:%22mongo.com-e25a2-11e3-8a73-0026b9414f30%22&wt=xml&shards.info=true Response: *1* 17.853292 3 *1* 17.850622 2 0 0.0 3 0 0.0 4 0 0.0 19 -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-Cloud-Duplicate-documents-in-multiple-shards-tp4218162p4219458.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Stemming Issue
As it is possible to read in the documentation, the KStemFilter is a soft ( not much aggressive) english stemmer. As Ahmet properly specified, are you preceding that filter with a lowercase one ? What is exactly the stemming you get that doesn't convince you ? Cheers 2015-07-28 0:16 GMT+01:00 Ahmet Arslan : > Hi Ravi, > > Do you have a lowercase filter before the KStemFilter? > There are a number of stemmer implementations out there. > > Ahmet > > > > > > On Monday, July 27, 2015 7:25 PM, "EXTERNAL Taminidi Ravi (ETI, > AA-AS/PAS-PTS)" wrote: > > > > Hi , I am using the solr.KStemFilterFactory in my solr schema for a custom > field type. When I use the interface (Solr) to Analysis the words. I am > getting strange behavior. > > E.g. If Add the keyword "Supplies" I am not getting anything like > "Supply". Is this behavior is because of the Kstem, is there any other > stemming algorithm can fix this issue. > > Thanks > > Ravi > -- -- Benedetti Alessandro Visiting card - http://about.me/alessandro_benedetti Blog - http://alexbenedetti.blogspot.co.uk "Tyger, tyger burning bright In the forests of the night, What immortal hand or eye Could frame thy fearful symmetry?" William Blake - Songs of Experience -1794 England
SOLR Exception with SOLR Cloud 5.1 setup on Linux
Hi, I have set up SOLR Cloud comprising of 2 solr instances and zookeeper in separate instance. Have created one shard in one of the solr node and the other solr node act as a replica for that shard. I am able to post documents through UI. But while trying to connect from Java layer I am getting below error. From Java level using CLoudSolrCLient class I am passing zookeeper host which is 10.111.65.152 on 2181 port. The collection name is umbcollection. I am not sure what is wrong here. Could someone help me in finding what could be the rootcause. org.apache.solr.client.solrj.SolrServerException: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://10.111.65.150:8080/solr/umbcollection: No active slice servicing hash code 103646ce in DocCollection(umbcollection)={ "shards":{"shard1":{ "range":"8000-", "state":"active", "replicas":{ "core_node1":{ "state":"active", "core":"umb", "node_name":"10.111.65.150:8080_solr", "base_url":"http://10.111.65.150:8080/solr";, "leader":"true"}, "core_node2":{ "state":"active", "core":"shard1-replica-1", "node_name":"10.111.65.151:8080_solr", "base_url":"http://10.111.65.151:8080/solr", "maxShardsPerNode":"1", "router":{"name":"compositeId"}, "replicationFactor":"1", "autoAddReplicas":"false", "autoCreated":"true"} Thanks Sangeetha
RE: Quantity wise price searching in Apache SOLR
This is a job for a custom query function. -Original Message- From: unique.jim...@gmail.com [mailto:unique.jim...@gmail.com] Sent: Tuesday, July 28, 2015 2:35 AM To: solr-user@lucene.apache.org Subject: Quantity wise price searching in Apache SOLR Currently I am working on e-commerce website where price can be vary based on quantity. For e.g Product A --- Quantity | 25 | 50 | 70 | 90+ | --- Price| 0.76 | 0.79 | 0.65 | 0.60 | --- Product B --- Quantity | 25 | 40 | 65 | 80+ | --- Price| 0.81 | 0.73 | 0.62 | 0.60 | --- Please note that quantity break will be different for one and another product. How I should save into solr so it fulfill following criteria. -If user search for desired quantity, system should pick price from that quantity range. If User search for 60 then system should show 0.65 for "Product A" and 0.62 for "Product B" -Also user selects desired quantity and sort by price "lowest to highest" It should match the price where selected quantity falls. If user search for quantity 60 then "Product B"(0.62) should be first and "Product A"(0.65) should be second. -If user sort "lowest to highest" without selecting quantity then system show show "Product A" should be first and "Product B" should be second as Product A (0.76) has lowest price than Product B(0.81) -- View this message in context: http://lucene.472066.n3.nabble.com/Quantity-wise-price-searching-in-Apache-SOLR-tp4219406.html Sent from the Solr - User mailing list archive at Nabble.com. * This e-mail may contain confidential or privileged information. If you are not the intended recipient, please notify the sender immediately and then delete it. TIAA-CREF *
Re: Use faceted search to drill down in hierarchical structure and omit node data outside current selection
The fact is that you are trying to model a hierarchical facet on documents that actually index the content as a simple field. What I would suggest for example is to use a PathhierarcyTokenizer for your field with a proper separator. This will produce these tokens in the index : input : Man > top > shirt > sleeveless shirt Tokenized : Man Man > top Man > top > shirt Man > top > shirt> sleeveless shirt At this point your counting will be exactly what you would like, you need only to parse it Search API side and model the hierarchical facets in nested elements. Cheers 2015-07-28 2:02 GMT+01:00 PeterKerk : > I have the following structure for my products, where a product may fall > into > multiple categories. In my case, a "caketopper", which would be under > "cake/caketoppers" as well as "caketoppers" (don't focus on the logic > behind > the category structure in this example). > > Category structure: > > cake > caketoppers > funny > > caketoppers > funny > > What I want is that when the user has chosen a category on level 0 (the > main > category selection), in this case 'caketoppers', I don't want to return the > attributes/values that same product has because it's also in a different > category. > I tried the following queries, but it keeps returning all data: > > > &f.slug_nl_0.facet.prefix=(caketoppers)&fq=slug_nl_0:"(caketoppers)" > > &f.slug_nl_0.facet.prefix="caketoppers"&fq=slug_nl_0:"(caketoppers)" > > I keep getting this result (cleaned for better readability): > > > > > caketoppers > cake > > > > > > > 6 > 6 > > > > > But my desired result would be: > > > > > caketoppers > > > > > > > 6 > > > > > > > field definition of 'slug_nl_0' in schema.xml: > multiValued="true"/> > > > I also tried with a more simple query but I'm getting the exact same > results: > > &facet.prefix=caketoppers&fq=slug_nl_0:caketoppers > > I then was reading into grouping: > http://wiki.apache.org/solr/FieldCollapsing > > So I tried adding that in my queries, but I get errors: > > > `&fq=slug_nl_0:taarttoppers&group=true&group.facet=true&group.field=slug_nl_0` > > error: can not use FieldCache on multivalued field: slug_nl_0 > > `&fq=slug_nl_0:taarttoppers&group=true&group.field=slug_nl_0` > > error: can not use FieldCache on multivalued field: slug_nl_0 > > `&fq=slug_nl_0:taarttoppers&group.facet=true&group.field=slug_nl_0` > > error: Specify the group.field as parameter or local parameter > > And then I noticed this at the bottom of the page: > > > Known Limitations Support for grouping on a multi-valued field has not > > yet been implemented. > > On that same Solr FieldCollapsing example page they refer to Best Buy as an > example. Now I wonder how that was implemented without support for > multivalued fields. > > What can I do? > > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Use-faceted-search-to-drill-down-in-hierarchical-structure-and-omit-node-data-outside-current-selectn-tp4219384.html > Sent from the Solr - User mailing list archive at Nabble.com. > -- -- Benedetti Alessandro Visiting card - http://about.me/alessandro_benedetti Blog - http://alexbenedetti.blogspot.co.uk "Tyger, tyger burning bright In the forests of the night, What immortal hand or eye Could frame thy fearful symmetry?" William Blake - Songs of Experience -1794 England
Re: SOLR Exception with SOLR Cloud 5.1 setup on Linux
On 7/28/2015 8:22 AM, sangeetha.subraman...@gtnexus.com wrote: > org.apache.solr.client.solrj.SolrServerException: > org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error > from server at http://10.111.65.150:8080/solr/umbcollection: No active slice > servicing hash code 103646ce in DocCollection(umbcollection)={ > > "shards":{"shard1":{ > "range":"8000-", That JSON structure looks like it is a complete collection clusterstate. Which means that you only have one shard, but it is configured to only cover half of the range of hash values. You have nothing covering through 7fff. That is consistent with the error message. There should be another shard which would cover the other half of the range. It seems highly unlikely that you could have ended up with this clusterstate unless you have been manually changing your collection with the collections API after creating it, or maybe doing manual tweaks to the config in zookeeper. Has anything like that happened? What is your Solr version? Thanks, Shawn
solr 5 post.jar simple post tool error when indexing java extension
Hi i am using solr 5.2.1 in windows 7 what I was trying to do is indexing java extension file using post.jar posting tool what I tried: java -Dauto=yes -Dc=java -Ddata=files -Dfiletypes=java -Drecursive=yes -jar post.jar abc.jar it gives me error java.lang.NoClassDefFoundError I also tried extensions like xyz, and it worked but only java extension does not work it just does not like java extension? Thanks! -- View this message in context: http://lucene.472066.n3.nabble.com/solr-5-post-jar-simple-post-tool-error-when-indexing-java-extension-tp4219509.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Use faceted search to drill down in hierarchical structure and omit node data outside current selection
Oh and one more thing, I was Googling on this and found http://www.springyweb.com/2012/01/hierarchical-faceting-with-elastic.html, so apparently your solution is similar to this: hierarchical Faceting With Elastic Search? So does your solution facilitate for items to be in multiple categories? e.g. a product may be in: Man Man > top Man > top > shirt Man > top > shirt> sleeveless shirt AND also fall under: Clothing Clothing > shirt Clothing > shirt> sleeveless shirt Thanks again! From: Alessandro Benedetti [via Lucene] Sent: Tuesday, July 28, 2015 10:26 To: PeterKerk Subject: Re: Use faceted search to drill down in hierarchical structure and omit node data outside current selection The fact is that you are trying to model a hierarchical facet on documents that actually index the content as a simple field. What I would suggest for example is to use a PathhierarcyTokenizer for your field with a proper separator. This will produce these tokens in the index : input : Man > top > shirt > sleeveless shirt Tokenized : Man Man > top Man > top > shirt Man > top > shirt> sleeveless shirt At this point your counting will be exactly what you would like, you need only to parse it Search API side and model the hierarchical facets in nested elements. Cheers 2015-07-28 2:02 GMT+01:00 PeterKerk <[hidden email]>: > I have the following structure for my products, where a product may fall > into > multiple categories. In my case, a "caketopper", which would be under > "cake/caketoppers" as well as "caketoppers" (don't focus on the logic > behind > the category structure in this example). > > Category structure: > > cake > caketoppers > funny > > caketoppers > funny > > What I want is that when the user has chosen a category on level 0 (the > main > category selection), in this case 'caketoppers', I don't want to return the > attributes/values that same product has because it's also in a different > category. > I tried the following queries, but it keeps returning all data: > > > &f.slug_nl_0.facet.prefix=(caketoppers)&fq=slug_nl_0:"(caketoppers)" > > &f.slug_nl_0.facet.prefix="caketoppers"&fq=slug_nl_0:"(caketoppers)" > > I keep getting this result (cleaned for better readability): > > > > > caketoppers > cake > > > > > > > 6 > 6 > > > > > But my desired result would be: > > > > > caketoppers > > > > > > > 6 > > > > > > > field definition of 'slug_nl_0' in schema.xml: > multiValued="true"/> > > > I also tried with a more simple query but I'm getting the exact same > results: > > &facet.prefix=caketoppers&fq=slug_nl_0:caketoppers > > I then was reading into grouping: > http://wiki.apache.org/solr/FieldCollapsing > > So I tried adding that in my queries, but I get errors: > > > `&fq=slug_nl_0:taarttoppers&group=true&group.facet=true&group.field=slug_nl_0` > > > error: can not use FieldCache on multivalued field: slug_nl_0 > > `&fq=slug_nl_0:taarttoppers&group=true&group.field=slug_nl_0` > > error: can not use FieldCache on multivalued field: slug_nl_0 > > `&fq=slug_nl_0:taarttoppers&group.facet=true&group.field=slug_nl_0` > > error: Specify the group.field as parameter or local parameter > > And then I noticed this at the bottom of the page: > > > Known Limitations Support for grouping on a multi-valued field has not > > yet been implemented. > > On that same Solr FieldCollapsing example page they refer to Best Buy as an > example. Now I wonder how that was implemented without support for > multivalued fields. > > What can I do? > > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Use-faceted-search-to-drill-down-in-hierarchical-structure-and-omit-node-data-outside-current-selectn-tp4219384.html > Sent from the Solr - User mailing list archive at Nabble.com. > -- -- Benedetti Alessandro Visiting card - http://about.me/alessandro_benedetti Blog - http://alexbenedetti.blogspot.co.uk "Tyger, tyger burning bright In the forests of the night, What immortal hand or eye Could frame thy fearful symmetry?" William Blake - Songs of Experience -1794 England
Re: Use faceted search to drill down in hierarchical structure and omit node data outside current selection
Hi Peter, yeah, i briefly read it, it seems quite similar ! There is no problem I can see yet with Multi values. The token produced will be properly managed. Cheers 2015-07-28 17:06 GMT+01:00 PeterKerk : > Oh and one more thing, I was Googling on this and found > http://www.springyweb.com/2012/01/hierarchical-faceting-with-elastic.html, > so apparently your solution is similar to this: hierarchical Faceting With > Elastic Search? > So does your solution facilitate for items to be in multiple categories? > e.g. a product may be in: > > Man > Man > top > Man > top > shirt > Man > top > shirt> sleeveless shirt > > AND also fall under: > > Clothing > Clothing > shirt > Clothing > shirt> sleeveless shirt > > Thanks again! > > From: Alessandro Benedetti [via Lucene] > Sent: Tuesday, July 28, 2015 10:26 > To: PeterKerk > Subject: Re: Use faceted search to drill down in hierarchical structure > and omit node data outside current selection > > The fact is that you are trying to model a hierarchical facet on documents > that actually index the content as a simple field. > > What I would suggest for example is to use a PathhierarcyTokenizer for your > field with a proper separator. > This will produce these tokens in the index : > > input : Man > top > shirt > sleeveless shirt > Tokenized : > > Man > Man > top > Man > top > shirt > Man > top > shirt> sleeveless shirt > > At this point your counting will be exactly what you would like, you need > only to parse it Search API side and model the hierarchical facets in > nested elements. > > Cheers > > > > 2015-07-28 2:02 GMT+01:00 PeterKerk <[hidden email]>: > > > > I have the following structure for my products, where a product may fall > > into > > multiple categories. In my case, a "caketopper", which would be under > > "cake/caketoppers" as well as "caketoppers" (don't focus on the logic > > behind > > the category structure in this example). > > > > Category structure: > > > > cake > > caketoppers > > funny > > > > caketoppers > > funny > > > > What I want is that when the user has chosen a category on level 0 (the > > main > > category selection), in this case 'caketoppers', I don't want to return > the > > attributes/values that same product has because it's also in a different > > category. > > I tried the following queries, but it keeps returning all data: > > > > > > &f.slug_nl_0.facet.prefix=(caketoppers)&fq=slug_nl_0:"(caketoppers)" > > > > &f.slug_nl_0.facet.prefix="caketoppers"&fq=slug_nl_0:"(caketoppers)" > > > > I keep getting this result (cleaned for better readability): > > > > > > > > > > caketoppers > > cake > > > > > > > > > > > > > > 6 > > 6 > > > > > > > > > > But my desired result would be: > > > > > > > > > > caketoppers > > > > > > > > > > > > > > 6 > > > > > > > > > > > > > > field definition of 'slug_nl_0' in schema.xml: > > > multiValued="true"/> > > > > > > I also tried with a more simple query but I'm getting the exact same > > results: > > > > &facet.prefix=caketoppers&fq=slug_nl_0:caketoppers > > > > I then was reading into grouping: > > http://wiki.apache.org/solr/FieldCollapsing > > > > So I tried adding that in my queries, but I get errors: > > > > > > > `&fq=slug_nl_0:taarttoppers&group=true&group.facet=true&group.field=slug_nl_0` > > > > error: can not use FieldCache on multivalued field: slug_nl_0 > > > > `&fq=slug_nl_0:taarttoppers&group=true&group.field=slug_nl_0` > > > > error: can not use FieldCache on multivalued field: slug_nl_0 > > > > `&fq=slug_nl_0:taarttoppers&group.facet=true&group.field=slug_nl_0` > > > > error: Specify the group.field as parameter or local parameter > > > > And then I noticed this at the bottom of the page: > > > > > Known Limitations Support for grouping on a multi-valued field has not > > > yet been implemented. > > > > On that same Solr FieldCollapsing example page they refer to Best Buy as > an > > example. Now I wonder how that was implemented without support for > > multivalued fields. > > > > What can I do? > > > > > > > > > > -- > > View this message in context: > > > http://lucene.472066.n3.nabble.com/Use-faceted-search-to-drill-down-in-hierarchical-structure-and-omit-node-data-outside-current-selectn-tp4219384.html > > Sent from the Solr - User mailing list archive at Nabble.com. > > > > > > -- > ---
Re: Dollar signs in field names
Thanks for your answer! As mentioned, I'm aware of the problems with other characters like colons and dashes. I've just never run into any issues with dollar signs. And previously, before there was an official definition, I heard from several people that "valid Java identifiers" was a good rule of thumb – which would include dollar signs. I'd just hoped that when there would be a definition (and it's of course very good and important that there now is one) it would more or less mirror that rule of thumb and also allow for dollar signs. Now it's a pretty tough call whether to use them or not. Cheers, Thomas On 2015-07-27 21:31, Erick Erickson wrote: > The problem has been that field naming conventions weren't > _ever_ defined strictly. It's not that anyone is taking away > the ability to use other characters, rather it's codifying what's always > been true; Solr isn't guaranteed to play nice with naming > conventions other than those specified on the page you > referenced, alphanumerics and underscores and _not_ starting > with numerics. > > The danger is that parsing the incoming URL can run into > "issues". Take for instance a colon. How would the parsing > process distinguish that from a field:value separator? Or a > hyphen when is that NOT and when is that part of a field > name? Periods are also interesting. You can specify some > params (e.g. facet params) with periods (f.field.prop=). No > guarantee has ever been made that a field _name_ with a > period won't confuse things. It happens to work, but that's > not by design, just like dollar signs. > > So you can use dollar signs, but there won't be any attempts > to support it if some component somewhere doesn't "do the > right thing" with it. And no guarantee that there aren't current > corner cases where that causes problems. And if it does cause > problems, support won't be added. > > Best, > Erick > > On Mon, Jul 27, 2015 at 10:42 AM, Thomas Seidl wrote: >> Hi all, >> >> I've used dollar signs in field names for several years now, as an easy >> way to escape "bad" characters (like colons) coming in from the original >> source of the data, and I've never had any problems. Since I don't know >> of any Solr request parameters that use a dollar sign as a special >> character, I also wouldn't know where one might occur. >> >> But while I remember that the "supported" format for field names was >> previously completely undocumented (and it was basically "almost >> anything is supported, but some things might not work with some >> characters"), I now read that for about a year there has been a strict >> definition/recommendation in the Solr wiki [1] which doesn't allow for >> dollar signs. >> >> [1] https://cwiki.apache.org/confluence/display/solr/Defining+Fields >> >> So, my question is: Is this just for an easier definition, or is there a >> real danger of problems when using dollar signs in field names? Or, >> differently: How "bad" of an idea is it? >> Also, where was this definition discussed, why was this decision >> reached? Is there really an argument against dollar signs? I have to say >> it is really very handy to have a character available for field names >> that is usually not allowed in programming language's identifiers (as a >> cheap escape character). >> >> Thanks in advance, >> Thomas >
Re: SOLR Exception with SOLR Cloud 5.1 setup on Linux
Yes I did create two shards and two replicas and later dropped the other one.. Version is 5.1 . can you please tell me how this can be fixed ?? Thanks Sangeetha Sent from mobile On Jul 28, 2015 8:46 PM, Shawn Heisey wrote: On 7/28/2015 8:22 AM, sangeetha.subraman...@gtnexus.com wrote: > org.apache.solr.client.solrj.SolrServerException: > org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error > from server at http://10.111.65.150:8080/solr/umbcollection: No active sice > servicing hash code 103646ce in DocCollection(umbcollection)={ > > "shards":{"shard1":{ > "range":"8000-", That JSON structure looks like it is a complete collection cluterstate. Which means that you only have one shard, but it i configured to only cover half of the range of hash values. You have nothing covering through 7fff. That is consistent with the error message. There should be another shard which would cover the other half of the range. It seems highly unlikely that you could have ended up with thi cluterstate unless you have been manually changing your collection with the collections API after creating it, or maybe doing manual tweaks to the config in zookeeper. Has anything like that happened? What is your Solr version? Thanks, Shawn
Parameterized values
http://yonik.com/solr-query-parameter-substitution/ This is not working as part of QTs. Cannot load the core, since ${value} is being used for XML parameters for system property substitution. https://wiki.apache.org/solr/SolrConfigXml#System_property_substitution Can we support both? PS127 hosp_quality_spec_boost:${pspec} This does not work. -- Bill Bell billnb...@gmail.com cell 720-256-8076
Re: Dollar signs in field names
Leading dollar sign indicates parameter substitution. Embedded dollar sign should - in theory - work. -- Jack Krupansky On Tue, Jul 28, 2015 at 1:00 PM, Thomas Seidl wrote: > Thanks for your answer! > > As mentioned, I'm aware of the problems with other characters like > colons and dashes. I've just never run into any issues with dollar > signs. And previously, before there was an official definition, I heard > from several people that "valid Java identifiers" was a good rule of > thumb – which would include dollar signs. > > I'd just hoped that when there would be a definition (and it's of course > very good and important that there now is one) it would more or less > mirror that rule of thumb and also allow for dollar signs. > > Now it's a pretty tough call whether to use them or not. > > Cheers, > Thomas > > On 2015-07-27 21:31, Erick Erickson wrote: > > The problem has been that field naming conventions weren't > > _ever_ defined strictly. It's not that anyone is taking away > > the ability to use other characters, rather it's codifying what's always > > been true; Solr isn't guaranteed to play nice with naming > > conventions other than those specified on the page you > > referenced, alphanumerics and underscores and _not_ starting > > with numerics. > > > > The danger is that parsing the incoming URL can run into > > "issues". Take for instance a colon. How would the parsing > > process distinguish that from a field:value separator? Or a > > hyphen when is that NOT and when is that part of a field > > name? Periods are also interesting. You can specify some > > params (e.g. facet params) with periods (f.field.prop=). No > > guarantee has ever been made that a field _name_ with a > > period won't confuse things. It happens to work, but that's > > not by design, just like dollar signs. > > > > So you can use dollar signs, but there won't be any attempts > > to support it if some component somewhere doesn't "do the > > right thing" with it. And no guarantee that there aren't current > > corner cases where that causes problems. And if it does cause > > problems, support won't be added. > > > > Best, > > Erick > > > > On Mon, Jul 27, 2015 at 10:42 AM, Thomas Seidl wrote: > >> Hi all, > >> > >> I've used dollar signs in field names for several years now, as an easy > >> way to escape "bad" characters (like colons) coming in from the original > >> source of the data, and I've never had any problems. Since I don't know > >> of any Solr request parameters that use a dollar sign as a special > >> character, I also wouldn't know where one might occur. > >> > >> But while I remember that the "supported" format for field names was > >> previously completely undocumented (and it was basically "almost > >> anything is supported, but some things might not work with some > >> characters"), I now read that for about a year there has been a strict > >> definition/recommendation in the Solr wiki [1] which doesn't allow for > >> dollar signs. > >> > >> [1] https://cwiki.apache.org/confluence/display/solr/Defining+Fields > >> > >> So, my question is: Is this just for an easier definition, or is there a > >> real danger of problems when using dollar signs in field names? Or, > >> differently: How "bad" of an idea is it? > >> Also, where was this definition discussed, why was this decision > >> reached? Is there really an argument against dollar signs? I have to say > >> it is really very handy to have a character available for field names > >> that is usually not allowed in programming language's identifiers (as a > >> cheap escape character). > >> > >> Thanks in advance, > >> Thomas > > >
Re: Parameterized values
https://issues.apache.org/jira/browse/SOLR-7846 On Tue, Jul 28, 2015 at 11:16 AM, William Bell wrote: > http://yonik.com/solr-query-parameter-substitution/ > > This is not working as part of QTs. > > Cannot load the core, since ${value} is being used for XML parameters for > system property substitution. > > https://wiki.apache.org/solr/SolrConfigXml#System_property_substitution > > Can we support both? > > PS127 > hosp_quality_spec_boost:${pspec} > > > This does not work. > > > -- > Bill Bell > billnb...@gmail.com > cell 720-256-8076 > -- Bill Bell billnb...@gmail.com cell 720-256-8076
Re: SOLR Exception with SOLR Cloud 5.1 setup on Linux
On 7/28/2015 11:06 AM, sangeetha.subraman...@gtnexus.com wrote: > Yes I did create two shards and two replicas and later dropped the other > one.. Version is 5.1 . can you please tell me how this can be fixed ?? That's why you're having trouble. Half the index disappeared when you deleted that shard, along with the information telling SolrCloud how to hash documents into that shard. Now it has no information about where to index documents matching the hash range of the deleted shard, so an error is returned when you try. Adding and deleting shards does *NOT* change document distribution. There are only two ways to change how documents are hashed among your shards: Either you can split a shard, making new ones where each has a portion of the hash range of the original, or you can create an entirely new collection. To get out of the hole you're in now, either build a new collection with the actual shard count that you want so it's correctly set up, or edit the clusterstate in zookeeper to change the hash range (change 8000 to ) and then restart all your solr servers. For the latter option, a complete reindex is also a good idea. If you build a new collection, you can delete the old one and then set up a collection alias so that the original name works with the new collection. A reindex will be required, because the new collection will initially have no documents. Thanks, Shawn
Re: SOLR Exception with SOLR Cloud 5.1 setup on Linux
On Tue, Jul 28, 2015 at 6:54 PM, Shawn Heisey wrote: > To get out of the hole you're in now, either build a new collection with > the actual shard count that you want so it's correctly set up, or edit > the clusterstate in zookeeper to change the hash range (change 8000 > to ) Actually, if you want a range that covers the entire 32 bit hash space, it would be 8000-7fff (hex representations of signed integers). -Yonik
Re: Have anyone used Automatic Phrase Tokenization (AutoPhrasingTokenFilterFactory) ?
-- View this message in context: http://lucene.472066.n3.nabble.com/Have-anyone-used-Automatic-Phrase-Tokenization-AutoPhrasingTokenFilterFactory-tp4173808p4219594.html Sent from the Solr - User mailing list archive at Nabble.com.