AW: PHP + Solr
Hi Felipe, I would advise to go with Solarium here. The PHP PECL integration is outdated to a degree that renders it almost useless by now. It has a couple of bugs when fetching large result sets. Good luck, Alex -Ursprüngliche Nachricht- Von: Felipe Dantas de Souza Paiva [mailto:cad_fpa...@uolinc.com] Gesendet: Dienstag, 28. Januar 2014 19:55 An: solr-user@lucene.apache.org Betreff: PHP + Solr Hi Folks, I would like to know what is the best way to integrate PHP and Apache Solr. Until now I've found two options: 1) http://www.php.net/manual/en/intro.solr.php 2) http://www.solarium-project.org/ What do you guys say? Cheers, Felipe AVISO: A informaç?o contida neste e-mail, bem como em qualquer de seus anexos, é CONFIDENCIAL e destinada ao uso exclusivo do(s) destinat?rio(s) acima referido(s), podendo conter informaç?es sigilosas e/ou legalmente protegidas. Caso você n?o seja o destinat?rio desta mensagem, informamos que qualquer divulgaç?o, distribuiç?o ou c?pia deste e-mail e/ou de qualquer de seus anexos é absolutamente proibida. Solicitamos que o remetente seja comunicado imediatamente, respondendo esta mensagem, e que o original desta mensagem e de seus anexos, bem como toda e qualquer c?pia e/ou impress?o realizada a partir destes, sejam permanentemente apagados e/ou destru?dos. Informaç?es adicionais sobre nossa empresa podem ser obtidas no site http://sobre.uol.com.br/. NOTICE: The information contained in this e-mail and any attachments thereto is CONFIDENTIAL and is intended only for use by the recipient named herein and may contain legally privileged and/or secret information. If you are not the e-mail´s intended recipient, you are hereby notified that any dissemination, distribution or copy of this e-mail, and/or any attachments thereto, is strictly prohibited. Please immediately notify the sender replying to the above mentioned e-mail address, and permanently delete and/or destroy the original and any copy of this e-mail and/or its attachments, as well as any printout thereof. Additional information about our company may be obtained through the site http://www.uol.com.br/ir/.
Re: How to retrive all terms with their frequency in that website.
I guess the Term Vector Component might satisfy all or most of what you're trying to do: http://wiki.apache.org/solr/TermVectorComponent On 21.02.2013 12:58, search engn dev wrote: I have indexed data of 10 websites in solr. Now i want to dump data of each website with following format : [Terms,Frequency of terms in that website ,IDF] Can i do this with solr admin, or i need to write any script for that? -- View this message in context: http://lucene.472066.n3.nabble.com/How-to-retrive-all-terms-with-their-frequency-in-that-website-tp4041848.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Filter Queries: Intersection
http://www.lucidimagination.com/blog/2011/12/28/why-not-and-or-and-not/ - That's an excellent read - thanks a lot for the heads-up! Kind regards, Alex On 16.03.2012 14:08, Erick Erickson wrote: Your problem is that you're saying with the -myField:* Remove from the result set all documents with any value in myField, which is not what you want. Lucene query language is not strictly boolean logic, here's an excellent writeup: http://www.lucidimagination.com/blog/2011/12/28/why-not-and-or-and-not/ you want something like (myfield:bob myfield:alice) (*:* -myfield:*) Best Erick On Thu, Mar 15, 2012 at 10:23 AM, Alexander Golubowitsch alexander.golubowit...@antikoerper-online.de wrote: Hi all, I'm facing problems regarding multiple Filter Queries in SOLR 1.4.1 - I hope some one will be able to help. Example 1 - works fine: {!tag=myfieldtag}(-(myfield:*)) Example 2 - works fine: {!tag=myfieldtag}((myfield:Bio | myfield:Alexa)) Please note that in Example 2, result sets of individual filter queries do not intersect; 'OR' just works as expected. Example 3 - no results: {!tag=myfieldtag}((myfield:Bio | myfield:Alexa) | -(myfield:*)) What I am trying to generate is results having either no value for myfield, or any of {Alexa, Bio}. How would I acomplish that? I have tried all combinations/positions of brackets, +/- etc., without success. Thanks a lot for any advice! Kind regards, Alex
Filter Queries: Intersection
Hi all, I'm facing problems regarding multiple Filter Queries in SOLR 1.4.1 - I hope some one will be able to help. Example 1 - works fine: {!tag=myfieldtag}(-(myfield:*)) Example 2 - works fine: {!tag=myfieldtag}((myfield:Bio | myfield:Alexa)) Please note that in Example 2, result sets of individual filter queries do not intersect; 'OR' just works as expected. Example 3 - no results: {!tag=myfieldtag}((myfield:Bio | myfield:Alexa) | -(myfield:*)) What I am trying to generate is results having either no value for myfield, or any of {Alexa, Bio}. How would I acomplish that? I have tried all combinations/positions of brackets, +/- etc., without success. Thanks a lot for any advice! Kind regards, Alex
RE: import Data via PHP
Hi Jörg, what exactly do you mean by it doesn't work? Is there some kind of error message? In any case you will at least want to url_encode() the data you add into that Curl url. Generally: - You can import data e.g. via a CSV file - You can use the Solr PHP PECL extension (which offers a few classes for accessing a Solr instance) -Original Message- From: Jörg Agatz [mailto:joerg.ag...@googlemail.com] Sent: Donnerstag, 14. Juli 2011 20:48 To: solr-user@lucene.apache.org Subject: import Data via PHP hallo users... i have a Problem.. I have ti indexin Data via PHP.. the Information for data existing... and the Fiels too.. ?php $id = $_POST['id']; $name = $_POST['name']; $url = $_POST['url']; $color = $_POST['color']; $size = $_POST['size']; ect... ? fields id, name, url, color, size are existing in schema, and it work.. But how can i send it to solr, i try it with curl.. but it dosent work curl http://myserver/solr/update/extract?commit=trueliteral.id=$idliteral.name= $nameliteral.url=$urlliteral.size=$sizestream.file=
RE: problem in setting field attribute in schema.xml
Hi Romi, as someone mentioned earlier already: indexed - The field value can be matched when you search on that field (field:some-value-to-match) stored -The field value can be retrieved from Solr in result sets (result docs can include that field and its value) @ Indexing in general: I think you will have to re-start Solr and/or re-index (maybe even delete / re-import) all your data after certain changes to your schema. Cannot formalize this any better, though, because I am an beginner myself. did u mean when i set indexed=false and store=true, solr does not index the field's value but store its value as it is???
copyField generates multiple values encountered for non multiValued field
Dear list, hope somebody can help me understand/avoid this. I am sending an add request with allowDuplicates=false to a Solr 1.4.1 instance. This is for debugging purposes, so I am sending the exact same data that are already stored in Solr's index. I am using the PHP PECL libraries, which fail completely in giving me any hint on what goes wrong. Only sending the same add request again gives me a proper SolrClientException that hints: ERROR: [288400] multiple values encountered for non multiValued field field2 [fieldvalue, fieldvalue] The scenario: - field1 is implicitly single value, type text, indexed and stored - field2 is generated via a copyField directive in schema.xml, implicitly single value, type string, indexed and stored What appears to happen: - On the first add (SolrClient::addDocuments(array(SolrInputDocument theDocument))), regular fields like field1 get overwritten as intended - field2, defined with a copyField, but still single value, gets _appended_ instead - When I retrieve the updated document in a query and try to add it again, it won't let me because of the inconsistent multi-value state - The PECL library, in addition, appears to hit some internal exception (that it doesn't handle properly) when encountering multiple values for a single value field. That gives me zero results querying a set that includes the document via PHP, while the document can be retrieved properly, though in inconsistent state, any other way. But: Solr appears to be generating the corrupted state itsself via copyField? What's going wrong? I'm pretty confused... Thank you, Alex