Re: Reg: Is there a way to query solr leader directly using solrj?
First off I'm a bit confused. You say you're working with an UpdateProcessorFactory but then want to use SolrJ to get a leader. Why do this? Why not just work entirely locally and reach into the _local_ index (note, you have to do this after the doc has been routed to the correct shard)? Once there you should be able to use the real-time get functionality to get the latest version that's been sent regardless of whether it's been committed or not. And in the middle of this you say you're "pointing to the leader", which implies you're really doing this from some external SolrJ client, not as part of an update chain at all. So I'm missing something. Or are you talking about doing this on the _client_? To answer your question, though, CloudSolrClient.getCollection(...).getLeader(...)... Best, Erick On Wed, Dec 14, 2016 at 4:48 AM, indhu priya wrote: > Hi, > > In my project I have one leader and one replica architecture. > I am using custom code( using DocumentUpdateProcessorFactory) for merging > old documents with incoming new documents. > > eg. 1. if 1st document have 10 fields, all 10 fields will be indexed. > 2. if 2nd document have 8 fields, 5 of which are in old document and > 3 are in new document, then we will find the old document in index(using > solrJ), then update the 5 fields of old document and add the new 3 fields > with old document and hence we have total 13 updated fields in result > document. > > When I am pointing to leader and do indexing, I am not facing any issues. > But if I point to replica, then I am facing issues. since document > distribution from replica to leader and again to replica is taking time. > > Eg. If first document comes in replica at time t1, then the distribution to > leader happens at t2 and then the leader distributes it to replica at time > t3. But the second in-coming document is coming before t3 and hence the > custom code is not able to find its old document for merge. > > Hence, I need to know whether there is any simple way to query leader > directly using solrj other than finding the leader using zookeeper and then > hitting http url? > > Notes: We are using SOLR 5.5 and i tried using zookeeper but zookeeper is > distributing the query. > > Please let me know if any queries. > > Thanks, > Indhupriya.S
Reg: Is there a way to query solr leader directly using solrj?
Hi, In my project I have one leader and one replica architecture. I am using custom code( using DocumentUpdateProcessorFactory) for merging old documents with incoming new documents. eg. 1. if 1st document have 10 fields, all 10 fields will be indexed. 2. if 2nd document have 8 fields, 5 of which are in old document and 3 are in new document, then we will find the old document in index(using solrJ), then update the 5 fields of old document and add the new 3 fields with old document and hence we have total 13 updated fields in result document. When I am pointing to leader and do indexing, I am not facing any issues. But if I point to replica, then I am facing issues. since document distribution from replica to leader and again to replica is taking time. Eg. If first document comes in replica at time t1, then the distribution to leader happens at t2 and then the leader distributes it to replica at time t3. But the second in-coming document is coming before t3 and hence the custom code is not able to find its old document for merge. Hence, I need to know whether there is any simple way to query leader directly using solrj other than finding the leader using zookeeper and then hitting http url? Notes: We are using SOLR 5.5 and i tried using zookeeper but zookeeper is distributing the query. Please let me know if any queries. Thanks, Indhupriya.S
Re: [Result Query Solr] How to retrieve the content of pdfs
Hi Alexandre, Could you add fl=* to your query and check the output? Alternatively, have a look at your schema file and check what could look like content field: text or similar. Dmitry 14 сент. 2016 г. 1:27 AM пользователь "Alexandre Martins" < alexandremart...@gmail.com> написал: > Hi Guys, > > I'm trying to use the last version of solr and i have used the post tool > to upload 28 pdf files and it works fine. However, I don't know how to show > the content of the files in the resulted json. Anybody know how to include > this field? > > "responseHeader":{ "zkConnected":true, "status":0, "QTime":43, "params":{ > "q":"ABC", "indent":"on", "wt":"json", "_":"1473804420750"}}, "response": > {"numFound":40,"start":0,"maxScore":9.1066065,"docs":[ { "id": > "/home/alexandre/desenvolvimento/workspace/solr-6.2.0/pdfs_hack/abc.pdf", > "date":["2016-09-13T14:44:17Z"], "pdf_pdfversion":[1.5], "xmp_creatortool > ":["PDFCreator Version 1.7.3"], "stream_content_type":["application/pdf"], > "access_permission_modify_annotations":[false], " > access_permission_can_print_degraded":[false], "dc_creator":["abc"], " > dcterms_created":["2016-09-13T14:44:17Z"], "last_modified":["2016-09- > 13T14:44:17Z"], "dcterms_modified":["2016-09-13T14:44:17Z"], > "dc_format":["application/pdf; > version=1.5"], "title":["ABC tittle"], "xmpmm_documentid":["uuid: > 100ccff2-7c1c-11e6--ab7b62fc46ae"], "last_save_date":["2016-09- > 13T14:44:17Z"], "access_permission_fill_in_form":[false], "meta_save_date > ":["2016-09-13T14:44:17Z"], "pdf_encrypted":[false], "dc_title":["Tittle > abc"], "modified":["2016-09-13T14:44:17Z"], "content_type":["application/ > pdf"], "stream_size":[101948], "x_parsed_by":["org.apache. > tika.parser.DefaultParser", "org.apache.tika.parser.pdf.PDFParser"], " > creator":["mauricio.tostes"], "meta_author":["mauricio.tostes"], " > meta_creation_date":["2016-09-13T14:44:17Z"], "created":["Tue Sep 13 > 14:44:17 UTC 2016"], "access_permission_extract_for_accessibility":[false], > "access_permission_assemble_document":[false], "xmptpg_npages":[3], " > creation_date":["2016-09-13T14:44:17Z"], "resourcename":["/home/ > alexandre/desenvolvimento/workspace/solr-6.2.0/pdfs_hack/abc.pdf"], " > access_permission_extract_content":[false], "access_permission_can_print": > [false], "author":["abc.add"], "producer":["GPL Ghostscript 9.10"], " > access_permission_can_modify":[false], "_version_":1545395897488113664}, > > Alexandre Costa Martins > DATAPREV - IT Analyst > Software Reuse Researcher > MSc Federal University of Pernambuco > RiSE Member - http://www.rise.com.br > Sun Certified Programmer for Java 5.0 (SCPJ5.0) > > MSN: xandecmart...@hotmail.com > GTalk: alexandremart...@gmail.com > Skype: xandecmartins > Mobile: +55 (85) 9626-3631 >
Re: [Result Query Solr] How to retrieve the content of pdfs
The extracted content goes into text field which is not stored. You can make it stored but the output will really not be pretty. PDF is not a linear storage format. Regards, Alex On 14 Sep 2016 5:16 AM, "Alexandre Martins" wrote: > Hi Guys, > > I'm trying to use the last version of solr and i have used the post tool to > upload 28 pdf files and it works fine. However, I don't know how to show > the content of the files in the resulted json. Anybody know how to include > this field? > > "responseHeader":{ "zkConnected":true, "status":0, "QTime":43, "params":{ > "q > ":"ABC", "indent":"on", "wt":"json", "_":"1473804420750"}}, "response":{" > numFound":40,"start":0,"maxScore":9.1066065,"docs":[ { "id": > "/home/alexandre/desenvolvimento/workspace/solr-6.2.0/pdfs_hack/abc.pdf", > " > date":["2016-09-13T14:44:17Z"], "pdf_pdfversion":[1.5], > "xmp_creatortool":["PDFCreator > Version 1.7.3"], "stream_content_type":["application/pdf"], " > access_permission_modify_annotations":[false], " > access_permission_can_print_degraded":[false], "dc_creator":["abc"], " > dcterms_created":["2016-09-13T14:44:17Z"], "last_modified":[ > "2016-09-13T14:44:17Z"], "dcterms_modified":["2016-09-13T14:44:17Z"], " > dc_format":["application/pdf; version=1.5"], "title":["ABC tittle"], " > xmpmm_documentid":["uuid:100ccff2-7c1c-11e6--ab7b62fc46ae"], " > last_save_date":["2016-09-13T14:44:17Z"], "access_permission_fill_in_ > form":[ > false], "meta_save_date":["2016-09-13T14:44:17Z"], > "pdf_encrypted":[false], > "dc_title":["Tittle abc"], "modified":["2016-09-13T14:44:17Z"], " > content_type":["application/pdf"], "stream_size":[101948], "x_parsed_by":[ > "org.apache.tika.parser.DefaultParser", > "org.apache.tika.parser.pdf.PDFParser"], "creator":["mauricio.tostes"], " > meta_author":["mauricio.tostes"], "meta_creation_date":[ > "2016-09-13T14:44:17Z"], "created":["Tue Sep 13 14:44:17 UTC 2016"], " > access_permission_extract_for_accessibility":[false], " > access_permission_assemble_document":[false], "xmptpg_npages":[3], " > creation_date":["2016-09-13T14:44:17Z"], "resourcename":[ > "/home/alexandre/desenvolvimento/workspace/solr-6.2.0/pdfs_hack/abc.pdf"], > " > access_permission_extract_content":[false], "access_permission_can_print": > [ > false], "author":["abc.add"], "producer":["GPL Ghostscript 9.10"], " > access_permission_can_modify":[false], "_version_":1545395897488113664}, > > Alexandre Costa Martins > DATAPREV - IT Analyst > Software Reuse Researcher > MSc Federal University of Pernambuco > RiSE Member - http://www.rise.com.br > Sun Certified Programmer for Java 5.0 (SCPJ5.0) > > MSN: xandecmart...@hotmail.com > GTalk: alexandremart...@gmail.com > Skype: xandecmartins > Mobile: +55 (85) 9626-3631 >
[Result Query Solr] How to retrieve the content of pdfs
Hi Guys, I'm trying to use the last version of solr and i have used the post tool to upload 28 pdf files and it works fine. However, I don't know how to show the content of the files in the resulted json. Anybody know how to include this field? "responseHeader":{ "zkConnected":true, "status":0, "QTime":43, "params":{ "q ":"ABC", "indent":"on", "wt":"json", "_":"1473804420750"}}, "response":{" numFound":40,"start":0,"maxScore":9.1066065,"docs":[ { "id": "/home/alexandre/desenvolvimento/workspace/solr-6.2.0/pdfs_hack/abc.pdf", " date":["2016-09-13T14:44:17Z"], "pdf_pdfversion":[1.5], "xmp_creatortool":["PDFCreator Version 1.7.3"], "stream_content_type":["application/pdf"], " access_permission_modify_annotations":[false], " access_permission_can_print_degraded":[false], "dc_creator":["abc"], " dcterms_created":["2016-09-13T14:44:17Z"], "last_modified":[ "2016-09-13T14:44:17Z"], "dcterms_modified":["2016-09-13T14:44:17Z"], " dc_format":["application/pdf; version=1.5"], "title":["ABC tittle"], " xmpmm_documentid":["uuid:100ccff2-7c1c-11e6--ab7b62fc46ae"], " last_save_date":["2016-09-13T14:44:17Z"], "access_permission_fill_in_form":[ false], "meta_save_date":["2016-09-13T14:44:17Z"], "pdf_encrypted":[false], "dc_title":["Tittle abc"], "modified":["2016-09-13T14:44:17Z"], " content_type":["application/pdf"], "stream_size":[101948], "x_parsed_by":[ "org.apache.tika.parser.DefaultParser", "org.apache.tika.parser.pdf.PDFParser"], "creator":["mauricio.tostes"], " meta_author":["mauricio.tostes"], "meta_creation_date":[ "2016-09-13T14:44:17Z"], "created":["Tue Sep 13 14:44:17 UTC 2016"], " access_permission_extract_for_accessibility":[false], " access_permission_assemble_document":[false], "xmptpg_npages":[3], " creation_date":["2016-09-13T14:44:17Z"], "resourcename":[ "/home/alexandre/desenvolvimento/workspace/solr-6.2.0/pdfs_hack/abc.pdf"], " access_permission_extract_content":[false], "access_permission_can_print":[ false], "author":["abc.add"], "producer":["GPL Ghostscript 9.10"], " access_permission_can_modify":[false], "_version_":1545395897488113664}, Alexandre Costa Martins DATAPREV - IT Analyst Software Reuse Researcher MSc Federal University of Pernambuco RiSE Member - http://www.rise.com.br Sun Certified Programmer for Java 5.0 (SCPJ5.0) MSN: xandecmart...@hotmail.com GTalk: alexandremart...@gmail.com Skype: xandecmartins Mobile: +55 (85) 9626-3631
RE: Query Solr
There are some examples on the web for this: http://yonik.com/solr/query-syntax/ http://stackoverflow.com/questions/634765/using-or-and-not-in-solr-query If you are using .NET, maybe also try SolrNet. Maybe those help. -Original Message- From: Hardika Catur S [mailto:hardika.sa...@solusi247.com.INVALID] Sent: Wednesday, July 27, 2016 10:24 AM To: solr-user@lucene.apache.org Subject: Query Solr Hi, I will create a query multiple collections in solr where query in mysql like this "SELECT colection1.field_colection1 FROM colection1 WHERE colection1.field_colection1 NOT IN (SELECT colection2.field_colection2 FROM colection2);". But I find it difficult for create that query. Please help me to find a solution on. Thanks, Hardika CS.
Query Solr
Hi, I will create a query multiple collections in solr where query in mysql like this "SELECT colection1.field_colection1 FROM colection1 WHERE colection1.field_colection1 NOT IN (SELECT colection2.field_colection2 FROM colection2);". But I find it difficult for create that query. Please help me to find a solution on. Thanks, Hardika CS.
Re: [RESOLVED] Re: Need help on this AND query, solr returning incorrect results?
Glad it worked. That's one of Solr's little quirks that _everybody_ finds out, usually painfully. Erick On Tue, Oct 14, 2014 at 10:04 PM, Aaron Lewis wrote: > Thanks Erick, the uppercase worked, I just didn't know that ... > > On Wed, Oct 15, 2014 at 1:00 PM, Erick Erickson > wrote: >> and is case sensitive, have you tried it with AND? >> >> So this query is probably parsed as >> >> title:facebook OR defaultsearchfield:and OR subject:java >> >> assuming your default operator is "OR" >> >> Try it on the URL with &debug=query for a quick check of what the actual >> query is after it's made it through all the parsing... >> >> Best, >> Erick >> >> On Tue, Oct 14, 2014 at 7:46 PM, Aaron Lewis >> wrote: >>> Hi, >>> >>> I've indexed two rows with two columns: >>> >>> title: Google >>> subject: Java Interface >>> >>> and another >>> >>> title: FaceBook >>> subject: Not Java >>> >>> Now I use this query: >>> >>> title:"facebook" and subject:"java" >>> >>> It returns both of the rows above, weird. It looks like an "OR" query >>> to me, hmm. >>> >>> Attached the original PHP code (replace the `if (0)` if you're >>> inserting data for the first time) >>> >>> >>> >>$solr = new SolrClient (array ('hostname' => '127.0.0.1')); >>> >>>/// INSERT >>>if (0) >>>{ >>> $data = array ( >>> array ( >>> 'id' => 100, >>> 'title'=> 'Google', >>> 'subject' => 'Java Interface' >>> ), >>> array ( >>> 'id' => 101, >>> 'title'=> 'FaceBook', >>> 'subject' => 'Not Java' >>> ) >>> ); >>> >>> foreach ($data as $input) >>> { >>> $doc = new SolrInputDocument(); >>> foreach ($input as $key => $value) >>> { >>> $doc->addField ($key, $value); >>> } >>> >>> $solr->addDocument ($doc, false, 1000); >>> } >>> >>> sleep (3); >>>} >>> >>>/// QUERY >>>$query = new SolrQuery(); >>> >>>$query->setQuery('title:"facebook" and subject:"java"'); >>>$query->addField('id')->addField('title')->addField('subject'); >>> >>>$resp = $solr->query($query)->getResponse (); >>>print_r ($resp->response->docs); >>> >>> ?> >>> >>> >>> >>> -- >>> Best Regards, >>> Aaron Lewis - PGP: 0x13714D33 - http://pgp.mit.edu/ >>> Finger Print: 9F67 391B B770 8FF6 99DC D92D 87F6 2602 1371 4D33 > > > > -- > Best Regards, > Aaron Lewis - PGP: 0x13714D33 - http://pgp.mit.edu/ > Finger Print: 9F67 391B B770 8FF6 99DC D92D 87F6 2602 1371 4D33
[RESOLVED] Re: Need help on this AND query, solr returning incorrect results?
Thanks Erick, the uppercase worked, I just didn't know that ... On Wed, Oct 15, 2014 at 1:00 PM, Erick Erickson wrote: > and is case sensitive, have you tried it with AND? > > So this query is probably parsed as > > title:facebook OR defaultsearchfield:and OR subject:java > > assuming your default operator is "OR" > > Try it on the URL with &debug=query for a quick check of what the actual > query is after it's made it through all the parsing... > > Best, > Erick > > On Tue, Oct 14, 2014 at 7:46 PM, Aaron Lewis > wrote: >> Hi, >> >> I've indexed two rows with two columns: >> >> title: Google >> subject: Java Interface >> >> and another >> >> title: FaceBook >> subject: Not Java >> >> Now I use this query: >> >> title:"facebook" and subject:"java" >> >> It returns both of the rows above, weird. It looks like an "OR" query >> to me, hmm. >> >> Attached the original PHP code (replace the `if (0)` if you're >> inserting data for the first time) >> >> >> >$solr = new SolrClient (array ('hostname' => '127.0.0.1')); >> >>/// INSERT >>if (0) >>{ >> $data = array ( >> array ( >> 'id' => 100, >> 'title'=> 'Google', >> 'subject' => 'Java Interface' >> ), >> array ( >> 'id' => 101, >> 'title'=> 'FaceBook', >> 'subject' => 'Not Java' >> ) >> ); >> >> foreach ($data as $input) >> { >> $doc = new SolrInputDocument(); >> foreach ($input as $key => $value) >> { >> $doc->addField ($key, $value); >> } >> >> $solr->addDocument ($doc, false, 1000); >> } >> >> sleep (3); >>} >> >>/// QUERY >>$query = new SolrQuery(); >> >>$query->setQuery('title:"facebook" and subject:"java"'); >>$query->addField('id')->addField('title')->addField('subject'); >> >>$resp = $solr->query($query)->getResponse (); >>print_r ($resp->response->docs); >> >> ?> >> >> >> >> -- >> Best Regards, >> Aaron Lewis - PGP: 0x13714D33 - http://pgp.mit.edu/ >> Finger Print: 9F67 391B B770 8FF6 99DC D92D 87F6 2602 1371 4D33 -- Best Regards, Aaron Lewis - PGP: 0x13714D33 - http://pgp.mit.edu/ Finger Print: 9F67 391B B770 8FF6 99DC D92D 87F6 2602 1371 4D33
Re: Need help on this AND query, solr returning incorrect results?
and is case sensitive, have you tried it with AND? So this query is probably parsed as title:facebook OR defaultsearchfield:and OR subject:java assuming your default operator is "OR" Try it on the URL with &debug=query for a quick check of what the actual query is after it's made it through all the parsing... Best, Erick On Tue, Oct 14, 2014 at 7:46 PM, Aaron Lewis wrote: > Hi, > > I've indexed two rows with two columns: > > title: Google > subject: Java Interface > > and another > > title: FaceBook > subject: Not Java > > Now I use this query: > > title:"facebook" and subject:"java" > > It returns both of the rows above, weird. It looks like an "OR" query > to me, hmm. > > Attached the original PHP code (replace the `if (0)` if you're > inserting data for the first time) > > > $solr = new SolrClient (array ('hostname' => '127.0.0.1')); > >/// INSERT >if (0) >{ > $data = array ( > array ( > 'id' => 100, > 'title'=> 'Google', > 'subject' => 'Java Interface' > ), > array ( > 'id' => 101, > 'title'=> 'FaceBook', > 'subject' => 'Not Java' > ) > ); > > foreach ($data as $input) > { > $doc = new SolrInputDocument(); > foreach ($input as $key => $value) > { > $doc->addField ($key, $value); > } > > $solr->addDocument ($doc, false, 1000); > } > > sleep (3); >} > >/// QUERY >$query = new SolrQuery(); > >$query->setQuery('title:"facebook" and subject:"java"'); >$query->addField('id')->addField('title')->addField('subject'); > >$resp = $solr->query($query)->getResponse (); >print_r ($resp->response->docs); > > ?> > > > > -- > Best Regards, > Aaron Lewis - PGP: 0x13714D33 - http://pgp.mit.edu/ > Finger Print: 9F67 391B B770 8FF6 99DC D92D 87F6 2602 1371 4D33
Need help on this AND query, solr returning incorrect results?
Hi, I've indexed two rows with two columns: title: Google subject: Java Interface and another title: FaceBook subject: Not Java Now I use this query: title:"facebook" and subject:"java" It returns both of the rows above, weird. It looks like an "OR" query to me, hmm. Attached the original PHP code (replace the `if (0)` if you're inserting data for the first time) '127.0.0.1')); /// INSERT if (0) { $data = array ( array ( 'id' => 100, 'title'=> 'Google', 'subject' => 'Java Interface' ), array ( 'id' => 101, 'title'=> 'FaceBook', 'subject' => 'Not Java' ) ); foreach ($data as $input) { $doc = new SolrInputDocument(); foreach ($input as $key => $value) { $doc->addField ($key, $value); } $solr->addDocument ($doc, false, 1000); } sleep (3); } /// QUERY $query = new SolrQuery(); $query->setQuery('title:"facebook" and subject:"java"'); $query->addField('id')->addField('title')->addField('subject'); $resp = $solr->query($query)->getResponse (); print_r ($resp->response->docs); ?> -- Best Regards, Aaron Lewis - PGP: 0x13714D33 - http://pgp.mit.edu/ Finger Print: 9F67 391B B770 8FF6 99DC D92D 87F6 2602 1371 4D33
RE: How to query Solr for empty field or specific value
Thank you! -Original Message- From: Jack Krupansky [mailto:j...@basetechnology.com] Sent: Tuesday, July 02, 2013 3:05 PM To: solr-user@lucene.apache.org Subject: Re: How to query Solr for empty field or specific value Better to define color.not_null as a boolean field and always initialize as either true or false. But, even without that you need write a pure negative query or clause as (*:* -term) So: select?q=*:*&fq=((*:* -color:[* TO *]) OR color:blue) and select?q=*:*&fq=((*:* -color.not_null:[* TO *]) OR color:blue) -- Jack Krupansky -Original Message- From: Van Tassell, Kristian Sent: Tuesday, July 02, 2013 3:47 PM To: solr-user@lucene.apache.org Subject: How to query Solr for empty field or specific value Hello, I'm using Solr 4.2 and am trying to get a specific value (blue) or null field (no color) returned by my filter query. My results should yield 3 documents (If I execute the two separate filters in different queries, I get 2 hits for one query and 1 for the other). I've tried this (blue or no color set): select?q=*:*&fq=(-color:[* TO *] OR color:blue) When that returned zero hits, I added a new field called "color.not_null" and am setting it only if a color is defined (thinking there was a problem with using the same field name). select?q=*:*&fq=(-color.not_null:[* TO *] OR color:blue) That too yielded zero results. Again, executing them separately does return hits (3). Does anyone see what I might be doing wrong? Thanks in advance, Kristian
Re: How to query Solr for empty field or specific value
Better to define color.not_null as a boolean field and always initialize as either true or false. But, even without that you need write a pure negative query or clause as (*:* -term) So: select?q=*:*&fq=((*:* -color:[* TO *]) OR color:blue) and select?q=*:*&fq=((*:* -color.not_null:[* TO *]) OR color:blue) -- Jack Krupansky -Original Message- From: Van Tassell, Kristian Sent: Tuesday, July 02, 2013 3:47 PM To: solr-user@lucene.apache.org Subject: How to query Solr for empty field or specific value Hello, I'm using Solr 4.2 and am trying to get a specific value (blue) or null field (no color) returned by my filter query. My results should yield 3 documents (If I execute the two separate filters in different queries, I get 2 hits for one query and 1 for the other). I've tried this (blue or no color set): select?q=*:*&fq=(-color:[* TO *] OR color:blue) When that returned zero hits, I added a new field called "color.not_null" and am setting it only if a color is defined (thinking there was a problem with using the same field name). select?q=*:*&fq=(-color.not_null:[* TO *] OR color:blue) That too yielded zero results. Again, executing them separately does return hits (3). Does anyone see what I might be doing wrong? Thanks in advance, Kristian
How to query Solr for empty field or specific value
Hello, I'm using Solr 4.2 and am trying to get a specific value (blue) or null field (no color) returned by my filter query. My results should yield 3 documents (If I execute the two separate filters in different queries, I get 2 hits for one query and 1 for the other). I've tried this (blue or no color set): select?q=*:*&fq=(-color:[* TO *] OR color:blue) When that returned zero hits, I added a new field called "color.not_null" and am setting it only if a color is defined (thinking there was a problem with using the same field name). select?q=*:*&fq=(-color.not_null:[* TO *] OR color:blue) That too yielded zero results. Again, executing them separately does return hits (3). Does anyone see what I might be doing wrong? Thanks in advance, Kristian
Re: Out of Memory doing a query Solr 4.2
On Fri, Mar 15, 2013 at 6:46 AM, raulgrande83 wrote: > Thank you for your help. I'm afraid it won't be so easy to change de jvm > version, because it is required at the moment. > > It seems that Solr 4.2 supports Java 1.6 at least. Is that correct? > > Could you find any clue of what is happening in the attached traces? It > would be great to know why it is happening now, because it was working for > Solr 3.5. Its probably not an OOM at all. instead its more likely IBM JVM is probably miscompiling our code and producing large integers, like it does quite often. For example, we had to disable testing it completely recently for this reason. If someone were to report a JIRA issue that mentioned IBM, I'd make the same comment there but in general not take it seriously at all due to the kind of bugs i've seen from that JVM. The fact that IBM JVM didnt miscompile 3.5's code is irrelevant.
Re: Out of Memory doing a query Solr 4.2
We are currently using Oracle Corporation Java HotSpot(TM) 64-Bit Server VM (1.7.0_07 23.3-b01) Runs excellent and also no memory parameter tweaking neccessary. Give enough physical and JVM memory, use "-XX:+UseG1GC" and thats it. Also no "saw tooth" and GC timeouts from JVM as with earlier versions. Regards Bernd Am 15.03.2013 09:09, schrieb raulgrande83: > Why? Could this be the cause of the problem? This was working ok for Solr > 3.5. > > Could you recommend me one ? > > Thanks. > > > > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Out-of-Memory-doing-a-query-Solr-4-2-tp4047394p4047621.html > Sent from the Solr - User mailing list archive at Nabble.com. >
Re: Out of Memory doing a query Solr 4.2
On Thu, Mar 14, 2013 at 12:07 PM, raulgrande83 wrote: > JVM: IBM J9 VM(1.6.0.2.4) I don't recommend using this JVM.
Out of Memory doing a query Solr 4.2
onseWriter.java:50) at org.apache.solr.servlet.SolrDispatchFilter.writeResponse(SolrDispatchFilter.java:618) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:356) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:141) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:218) at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:333) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:394) -- View this message in context: http://lucene.472066.n3.nabble.com/Out-of-Memory-doing-a-query-Solr-4-2-tp4047394.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: How to query solr status
You can use Luke request handler, but for improving the speed set numTerms parameters to zero, like http://localhost:8983/solr/admin/luke?numTerms=0 It will give you information about optimized state of index as true More about this on Solr wiki: http://wiki.apache.org/solr/LukeRequestHandler 2011/7/26 ZiLi : > Anybody who knows how to query an solr server whether it is optimized or not ? > As replication can config slave to pull the indexes after "optimized" ,so I > think there must be someway to query that .But I didn't find any document to > identify that , anyone knows ? > Thanks so much O(n_n)O > Péter -- eXtensible Catalog http://drupal.org/project/xc
How to query solr status
Anybody who knows how to query an solr server whether it is optimized or not ? As replication can config slave to pull the indexes after "optimized" ,so I think there must be someway to query that .But I didn't find any document to identify that , anyone knows ? Thanks so much O(n_n)O
RE: Reverse sort facet query [SOLR-1672]
: i.e. just extend facet.sort to allow a 'count desc'. By convention, ok : to use a a space in the name? - or would count.desc (and count.asc as : alias for count) be more compliant? i would use space to remain consistent with the existing "sort" param. it might even make sense to refactor (re/ab)use the existing "sort" parsing code in QueryParsing.parseSort ... but now that that also know about parsing functions it's a bit hairry ... so that does seem a little crazy. : : : : Peter : : : : _ : We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now : http://clk.atdmt.com/UKM/go/195013117/direct/01/ -Hoss
RE: Reverse sort facet query [SOLR-1672]
> > now i'm totally confused: what are you suggesting this new param would > do, what does the name mean? > Sorry, I wan't clear - there isn't a new parameter, except the one added in the patch. What I was suggesting here is to do the work to remove the new parameter I just put in (facet.sortorder), and do it in exactly the way you mentioned - i.e. just extend facet.sort to allow a 'count desc'. By convention, ok to use a a space in the name? - or would count.desc (and count.asc as alias for count) be more compliant? Peter _ We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now http://clk.atdmt.com/UKM/go/195013117/direct/01/
RE: Reverse sort facet query [SOLR-1672]
: working well. The only caveat to this is that the reverse sort results : don't include 0-count facets (see notes in SOLR-1672), so reverse sort ... : believe patching to include 0 counts could open a can of worms in terms : of b/w compat and performance, as 0 counts look to be skipped (by : default). I could be wrong, and you may know better how changes to Hmmm... that behavior should all be driven by facet.mincount. i haven't look at that code in a long time, so an optimization may have been added to not bother trying to "sort" all of the 0s ... but the default for facet.mincount is 0 (ie: show everything) : Would you like me to go ahead and amend the patch (w/o 0-counts) to define a new 'sort' parameter? : : For naming, I would propose an extension of FacetParams.FACET_SORT_COUNT ala: : : public static final String FACET_SORT_COUNT_REVERSE = "count.reverse"; now i'm totally confused: what are you suggesting this new param would do, what does the name mean? my original point was that we probably don't need any new params at all: just change facet.sort to accept "count desc" and "count asc" in addition to "count" (which would become an alias for "count desc"). -Hoss
RE: Reverse sort facet query [SOLR-1672]
> Date: Sun, 3 Jan 2010 22:18:33 -0800 > From: hossman_luc...@fucit.org > To: solr-user@lucene.apache.org > Subject: RE: Reverse sort facet query [SOLR-1672] > > > : Yes, I thought about adding some 'new syntax', but I opted for a separate > 'facet.sortorder' parameter, > : > : mainly because I'm not familiar enough with the codebase to know what > effect this might have on > : > : backward compatibility. It would be easy enough to modify the patch I > created to do it this way. > > it shouldn't really affect anything -- it wouldn't really be new syntax, > just extending hte existing "sort" param syntax to apply to the > "facet.sort" param. The only back compat concern is making sure we > continue to support true/false as aliases, and having the default order > match the current bahvior if asc/desc aren't specified. > > > -Hoss > Yes, agreed. The current patch doesn't touch the b/w true/false aliasing, and any move to adding a new attr can keep all that intact. I've been using the current patch extensively in our testing, and that's working well. The only caveat to this is that the reverse sort results don't include 0-count facets (see notes in SOLR-1672), so reverse sort results start with the first count=1. This could be confusing as there could well be many facets whose count is 0, and it might be expected that these be returned in the first instance. >From my admittedly cursory look into the codebase regading this, I believe >patching to include 0 counts could open a can of worms in terms of b/w compat and performance, as 0 counts look to be skipped (by default). I could be wrong, and you may know better how changes to SimpleFacets/UnInvertedField would affect performance and compatibility. If there is indeed a performance optimization in facet counting iteration, it would, imo, be preferable to have the optimization, rather than the 0-counts. Would you like me to go ahead and amend the patch (w/o 0-counts) to define a new 'sort' parameter? For naming, I would propose an extension of FacetParams.FACET_SORT_COUNT ala: public static final String FACET_SORT_COUNT_REVERSE = "count.reverse"; I can then easily modify the patch to detect/use this value to invoke the new behaviour. Comments? Suggestions? Thanks, Peter _ Have more than one Hotmail account? Link them together to easily access both http://clk.atdmt.com/UKM/go/186394591/direct/01/
RE: Reverse sort facet query [SOLR-1672]
: Yes, I thought about adding some 'new syntax', but I opted for a separate 'facet.sortorder' parameter, : : mainly because I'm not familiar enough with the codebase to know what effect this might have on : : backward compatibility. It would be easy enough to modify the patch I created to do it this way. it shouldn't really affect anything -- it wouldn't really be new syntax, just extending hte existing "sort" param syntax to apply to the "facet.sort" param. The only back compat concern is making sure we continue to support true/false as aliases, and having the default order match the current bahvior if asc/desc aren't specified. -Hoss
RE: Reverse sort facet query [SOLR-1672]
> in Solr 1.4 the boolean syntax was deprecated in place of keywords that > are more meaninful... > http://wiki.apache.org/solr/SimpleFacetParameters#facet.sort > > ... "count" and "index" replaced "true" and "false" Yes, I thought about adding some 'new syntax', but I opted for a separate 'facet.sortorder' parameter, mainly because I'm not familiar enough with the codebase to know what effect this might have on backward compatibility. It would be easy enough to modify the patch I created to do it this way. [see SOLR-1672] Thanks, Peter > Date: Thu, 24 Dec 2009 22:24:25 -0800 > From: hossman_luc...@fucit.org > To: solr-user@lucene.apache.org > Subject: RE: Reverse sort facet query > > > : I'll have a look at SimpleFacets.java to look at patching it. I should > : think the sorting bit will be relatively straightforward. The tricky bit > : is how to submit the request via the query interface - there's only a > : boolean > > in Solr 1.4 the boolean syntax was deprecated in place of keywords that > are more meaninful... > http://wiki.apache.org/solr/SimpleFacetParameters#facet.sort > > ... "count" and "index" replaced "true" and "false" > > we could always start supporting "count desc" and "count asc" (with > "count" as an alias for "count desct" > > : The reverse facet query is for when you want to know which event (or > : group of event types) has happened the least > > got it, thanks. > > > > -Hoss > _ Add your Gmail and Yahoo! Mail email accounts into Hotmail - it's easy http://clk.atdmt.com/UKM/go/186394592/direct/01/
Re: SolrClient::query(): Solr HTTP Error : 'Couldn't connect to server'
On Fri, Dec 11, 2009 at 6:49 AM, regany wrote: > > hi, I've (hopefully correctly) install the solr php extension. > > But I'm receiving the following error when trying to run my test script: > > SolrClient::query(): Solr HTTP Error : 'Couldn't connect to server' > > Any ideas how to figure out why it's giving the error?? > > regan > > > > /* Domain name of the Solr server */ > define('SOLR_SERVER_HOSTNAME', 'localhost'); > > define('SOLR_SERVER_PATH', '/solr/core0'); > > /* Whether or not to run in secure mode */ > define('SOLR_SECURE', false ); > > /* HTTP Port to connection */ > define('SOLR_SERVER_PORT', ((SOLR_SECURE) ? 8443 : 8983)); > > $options = array( >'hostname' => SOLR_SERVER_HOSTNAME >,'port' => SOLR_SERVER_PORT >,'path' => SOLR_SERVER_PATH > > ); > > $client = new SolrClient($options); > $query = new SolrQuery(); > $query->setQuery('apple'); > $query->setStart(0); > $query->setRows(50); > $query_response = $client->Query($query); > print_r($query_response); > $respose = $query_response->getResponse(); > print_r($response); > > ?> > > > -- > View this message in context: > http://old.nabble.com/SolrClient%3A%3Aquery%28%29%3A-Solr-HTTP-Error-%3A-%27Couldn%27t-connect-to-server%27-tp26742899p26742899.html > Sent from the Solr - User mailing list archive at Nabble.com. > > Hi Regan, I have the following questions: 0. What version of Apache Solr are you using? 1.3, 1.4, nightly builds? 1. What version of PHP are you using and on what operating system? 2. What version of the Solr extension are you using? 3. Which servlet container are you using for Solr? (Jetty, Tomcat, Glass fish etc) 4. What is the hostname and port numbers and path to Solr? Is your port number 8080 or 8983 All please let me know what the output of $client->getDebug() is. This usually contains very detailed errors of what is happening during the connection. I would be happy to help you troubleshoot any errors you are having. -- "Good Enough" is not good enough. To give anything less than your best is to sacrifice the gift. Quality First. Measure Twice. Cut Once. http://www.israelekpo.com/
SolrClient::query(): Solr HTTP Error : 'Couldn't connect to server'
hi, I've (hopefully correctly) install the solr php extension. But I'm receiving the following error when trying to run my test script: SolrClient::query(): Solr HTTP Error : 'Couldn't connect to server' Any ideas how to figure out why it's giving the error?? regan SOLR_SERVER_HOSTNAME ,'port' => SOLR_SERVER_PORT ,'path' => SOLR_SERVER_PATH ); $client = new SolrClient($options); $query = new SolrQuery(); $query->setQuery('apple'); $query->setStart(0); $query->setRows(50); $query_response = $client->Query($query); print_r($query_response); $respose = $query_response->getResponse(); print_r($response); ?> -- View this message in context: http://old.nabble.com/SolrClient%3A%3Aquery%28%29%3A-Solr-HTTP-Error-%3A-%27Couldn%27t-connect-to-server%27-tp26742899p26742899.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Query | Solr conf and data (index) distribution using master slave configuration
On Fri, Apr 24, 2009 at 4:31 PM, Vicky_Dev wrote: > > Thanks Shalin for your reply > > Is it possible to replicate conf folder from master to slave? > > It should be possible but I've never tried to replicate config with the script based replication myself. The script based replication calls commit on the slave after the new index is downloaded. This makes Solr use the new index files. But a commit does not refresh configuration. For that, you'd need to reload the core itself. Not very straightforward I think. There's a new Java based replication in trunk right now which has built-in support for both index and config replication. Details on the wiki at http://wiki.apache.org/solr/SolrReplication -- Regards, Shalin Shekhar Mangar.
Re: Query | Solr conf and data (index) distribution using master slave configuration
Thanks Shalin for your reply Is it possible to replicate conf folder from master to slave? ~Vikrant Shalin Shekhar Mangar wrote: > > On Thu, Apr 23, 2009 at 10:10 AM, Vicky_Dev > wrote: > >> >> 1. Please confirm whether the tag entry : >> In solrconfig.xml should match for the Slave solr server / master solr >> server in accordance to the scripts.conf configuration settings. > > > Yes, dataDir in solrconfig.xml and scripts.conf should be same. > > >> >> >> 2. Also let us know whether some specific handling has to be done in case >> of >> using multi cores during replication. > > > You'd need to setup replication separately for each core. > -- > Regards, > Shalin Shekhar Mangar. > > -- View this message in context: http://www.nabble.com/Query-%7C-Solr-conf-and-data-%28index%29-distribution-using-master-slave-configuration-tp23189692p23214016.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Query | Solr conf and data (index) distribution using master slave configuration
On Thu, Apr 23, 2009 at 10:10 AM, Vicky_Dev wrote: > > 1. Please confirm whether the tag entry : > In solrconfig.xml should match for the Slave solr server / master solr > server in accordance to the scripts.conf configuration settings. Yes, dataDir in solrconfig.xml and scripts.conf should be same. > > > 2. Also let us know whether some specific handling has to be done in case > of > using multi cores during replication. You'd need to setup replication separately for each core. -- Regards, Shalin Shekhar Mangar.
Query | Solr conf and data (index) distribution using master slave configuration
I am working on replicating data from one Solr set on a Linux Box to Second Solr on another Linux box. In order to achieve the same we will use the SolrCollectionDistributionScripts(snapshooter, snappuller etc) and rsync utility. Configurations: 1. Apache Solr 1.3.0 2. Machines : Linux 3. Topology --1 Master and 1 slave Settings done: Solr on the both Linux boxes contains multiple cores. I have disintegrated the data to be indexed among multicores, sample solr path of data folder for the same is like: Path :: {SOLR_HOME}/solr/multicore//data Sample : /apache-solr-1.3.0/example/solr/multicore/CORE_WWW.ABCD.COM/data * SOLR_HOME :: /apache-solr-1.3.0/example/ ** multi_corename :: CORE_WWW.ABCD.COM Thus we will be going to have multiple cores on master as well as slaves servers As mentioned on http://wiki.apache.org/solr/CollectionDistribution :For the Solr distribution scripts, the name of the index directory can be defined by the environment variable data_dir in the configuration file conf/scripts.conf Example conf/scripts.conf file on slave solr server : user= solr_hostname=localhost solr_port=8080 rsyncd_port=18983 data_dir=${SOLR_HOME}/solr/muticore/CORE_WWW.ABCD.COM /data webapp_name=solr master_host=10.x.xx.xxx master_data_dir=${SOLR_HOME}/solr/muticore/CORE_WWW.ABCD.COM/data master_status_dir=${SOLR_HOME}/solr/muticore/CORE_WWW.ABCD.COM /status The index directory name mentioned above should match the value used by the Solr server which is defined in solr/conf/solrconfig.xml. Following are few queries: 1. Please confirm whether the tag entry : In solrconfig.xml should match for the Slave solr server / master solr server in accordance to the scripts.conf configuration settings. 2. Also let us know whether some specific handling has to be done in case of using multi cores during replication. 3. Are there any pitfalls in using the solr distribution scripts and rsync utility. ~Vikrant -- View this message in context: http://www.nabble.com/Query-%7C-Solr-conf-and-data-%28index%29-distribution-using-master-slave-configuration-tp23189692p23189692.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: simple filter query solr processing
: Cannot parse ' +i_subjects:"Film': Lexical error at line 1, column 19. : Encountered: after : "\"Film" : i do not want it splitting commas and replacing them with fq, but completely : matching on i_subjects:"film,media,mass communication" i'm having trouble interpreting the formating of your email, and understanding exactly what you've indexed, and waht your query looks like. can you please send: 1) the full url you are using when you get that error 2) the XML output from /admin/luke?fl=i_subjects&numTerms=100 Assuming you've indexed the exact string... film,media,mass communication then this should work fine in your URL... fq=i_subject%3A%22film%2Cmedia%2Cmass+communication%22 -Hoss
Re: simple filter query solr processing
tried that and managed to get no results. cheers for the help &fq=i_subjects:Anesthesia&fq=i_subjects:Intensive+Care&fq=i_subjects:Pain+Management ryantxu wrote: > >> >> tried removing the plusses i am inserting but now shows too many >> results >> >> &fq=+i_subjects:Film+i_subjects:+media+i_subjects:+mass+communication >> > > fq is a multi-valued field, try calling it like: > > &fq=i_subjects:Film&fq=i_subjects:mass communication&fq=... > > ryan > > -- View this message in context: http://www.nabble.com/simple-filter-query-solr-processing-tp20418363p20457529.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: simple filter query solr processing
tried removing the plusses i am inserting but now shows too many results &fq=+i_subjects:Film+i_subjects:+media+i_subjects:+mass+communication fq is a multi-valued field, try calling it like: &fq=i_subjects:Film&fq=i_subjects:mass communication&fq=... ryan
simple filter query solr processing
i have instances of felds which have commas seperating them. i need it to be treated as one filter (even tho its seperated by commas) for example facet : film,media,mass communication rendered result by solr Cannot parse ' +i_subjects:"Film': Lexical error at line 1, column 19. Encountered: after : "\"Film" i_subjects:"Film&fq=+media&fq=+mass+communication" i do not want it splitting commas and replacing them with fq, but completely matching on i_subjects:"film,media,mass communication" is this possible? i reckon there is some config option to turn this off? background to the problem i am indexing items which have a metadata called subjects. this would be for example humanities/film, media, mass communication/film im tokenizing on the "/" which results in humanities ; film, media, mass communication everything works except when the 'category' involves "," tried with removing the quotes fq=+%2Bi_subjects:Film&fq=+media&fq=+mass+communication but results in no matches tried splitting on the commas and inserting the key at each part +%2Bi_subjects:Film+%2Bi_subjects:+media+%2Bi_subjects:+mass+communication showed no results. tried removing the plusses i am inserting but now shows too many results &fq=+i_subjects:Film+i_subjects:+media+i_subjects:+mass+communication tried putting quotes in between each filter part &fq=+i_subjects:"Film"+i_subjects:"+media"+i_subjects:"+mass+communication" now shows too few results any pointers please? joe -- View this message in context: http://www.nabble.com/simple-filter-query-solr-processing-tp20418363p20418363.html Sent from the Solr - User mailing list archive at Nabble.com.