You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Dennis Gearon <ge...@sbcglobal.net> on 2010/12/16 10:14:01 UTC
PHPSolrClient
First of all, it's a very nice piece of work.
I am just getting my feet wet with Solr in general. So I 'am not even sure how a
document is NORMALLY deleted.
The library PHPDocs say 'add', 'get' 'delete', But does anyone know about
'update'?
(obviously one can read-delete-modify-create)
Dennis Gearon
Signature Warning
----------------
It is always a good idea to learn from your own mistakes. It is usually a better
idea to learn from others’ mistakes, so you do not have to make them yourself.
from 'http://blogs.techrepublic.com.com/security/?p=4501&tag=nl.e036'
EARTH has a Right To Life,
otherwise we all die.
Re: PHPSolrClient
Posted by Dennis Gearon <ge...@sbcglobal.net>.
So just use add and overwrite. OK, thanks
Dennis Gearon
Signature Warning
-
----- Original Message ----
From: Tanguy Moal <ta...@gmail.com>
To: solr-user@lucene.apache.org
Sent: Thu, December 16, 2010 1:33:36 AM
Subject: Re: PHPSolrClient
Hi Dennis,
Not particular to the client you use (solr-php-client) for sending
documents, think of update as an overwrite.
This means that if you update a particular document, the previous
version indexed is lost.
Therefore, when updating a document, make sure that all the fields to
be indexed and retrieved are present in the update.
For an update to occur, only the uniqueKey id (as specified in your
schema.xml) has to be the same as the document you want to update.
Shortly, an update is like an add, (and performed the same way) except
that the added document was previously indexed. It simple gets
replaced by the update.
Hope that helps,
--
Tanguy
2010/12/16 Dennis Gearon <ge...@sbcglobal.net>:
> First of all, it's a very nice piece of work.
>
> I am just getting my feet wet with Solr in general. So I 'am not even sure how
>a
> document is NORMALLY deleted.
>
> The library PHPDocs say 'add', 'get' 'delete', But does anyone know about
> 'update'?
> (obviously one can read-delete-modify-create)
>
> Dennis Gearon
>
>
> Signature Warning
> ----------------
> It is always a good idea to learn from your own mistakes. It is usually a
>better
> idea to learn from others’ mistakes, so you do not have to make them yourself.
> from 'http://blogs.techrepublic.com.com/security/?p=4501&tag=nl.e036'
>
>
> EARTH has a Right To Life,
> otherwise we all die.
>
>
Re: PHPSolrClient
Posted by Tanguy Moal <ta...@gmail.com>.
Hi Dennis,
Not particular to the client you use (solr-php-client) for sending
documents, think of update as an overwrite.
This means that if you update a particular document, the previous
version indexed is lost.
Therefore, when updating a document, make sure that all the fields to
be indexed and retrieved are present in the update.
For an update to occur, only the uniqueKey id (as specified in your
schema.xml) has to be the same as the document you want to update.
Shortly, an update is like an add, (and performed the same way) except
that the added document was previously indexed. It simple gets
replaced by the update.
Hope that helps,
--
Tanguy
2010/12/16 Dennis Gearon <ge...@sbcglobal.net>:
> First of all, it's a very nice piece of work.
>
> I am just getting my feet wet with Solr in general. So I 'am not even sure how a
> document is NORMALLY deleted.
>
> The library PHPDocs say 'add', 'get' 'delete', But does anyone know about
> 'update'?
> (obviously one can read-delete-modify-create)
>
> Dennis Gearon
>
>
> Signature Warning
> ----------------
> It is always a good idea to learn from your own mistakes. It is usually a better
> idea to learn from others’ mistakes, so you do not have to make them yourself.
> from 'http://blogs.techrepublic.com.com/security/?p=4501&tag=nl.e036'
>
>
> EARTH has a Right To Life,
> otherwise we all die.
>
>
Re: PHPSolrClient
Posted by Erick Erickson <er...@gmail.com>.
As Tanguy says, simply re-adding a document with the same
<uniqueKey> will automatically delete/readd the doc.
But I wanted to add a caution about your phrase "read-delete-modify-create"
You only get back what you #stored#. So generally the update is done
from the original source rather than the index.
So it's simple if <uniqueKey> is there, just add the doc.
Best
Erick
On Thu, Dec 16, 2010 at 4:14 AM, Dennis Gearon <ge...@sbcglobal.net>wrote:
> First of all, it's a very nice piece of work.
>
> I am just getting my feet wet with Solr in general. So I 'am not even sure
> how a
> document is NORMALLY deleted.
>
> The library PHPDocs say 'add', 'get' 'delete', But does anyone know about
> 'update'?
> (obviously one can read-delete-modify-create)
>
> Dennis Gearon
>
>
> Signature Warning
> ----------------
> It is always a good idea to learn from your own mistakes. It is usually a
> better
> idea to learn from others’ mistakes, so you do not have to make them
> yourself.
> from 'http://blogs.techrepublic.com.com/security/?p=4501&tag=nl.e036'
>
>
> EARTH has a Right To Life,
> otherwise we all die.
>
>