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 "onlinespending@gmail.com" <on...@gmail.com> on 2010/09/16 20:30:11 UTC
SOLR interface with PHP using javabin?
I am planning on creating a website that has some SOLR search
capabilities for the users, and was also planning on using PHP for the
server-side scripting.
My goal is to find the most efficient way to submit search queries from
the website, interface with SOLR, and display the results back on the
website. If I use PHP, it seems that all the solutions use some form of
character based stream for the interface. It would seem that using a
binary representation, such as javabin, would be more efficient.
If using javabin, or some similar efficient binary stream to interface
SOLR with PHP is not possible, what do people recommend as the most
efficient solution that provides the best performance, even if that
means not using PHP and going with some other alternative?
Thank you,
Ben
Re: SOLR interface with PHP using javabin?
Posted by "onlinespending@gmail.com" <on...@gmail.com>.
OK, thanks for the suggestion. Why do you recommend using JSON over
simply using the built-in PHPSerializedResponseWriter?
I find using an interface that requires the data to be parsed to be
inefficient (this would include the aforementioned
PHPSerializedResponseWriter as well). Wouldn't it be far better to use
some standard data structure that is sent as a bit stream?
Ben
On 9/16/2010 11:38 AM, Thomas Joiner wrote:
> If you wish to interface to Solr from PHP, and decide to go with Yonik's
> suggestion to use JSON, I would suggest using
> http://code.google.com/p/solr-php-client/
>
> It has served my needs for the most part.
>
> On Thu, Sep 16, 2010 at 1:33 PM, Yonik Seeley<yo...@lucidimagination.com>wrote:
>
>> On Thu, Sep 16, 2010 at 2:30 PM, onlinespending@gmail.com
>> <on...@gmail.com> wrote:
>>> I am planning on creating a website that has some SOLR search
>> capabilities
>>> for the users, and was also planning on using PHP for the server-side
>>> scripting.
>>>
>>> My goal is to find the most efficient way to submit search queries from
>> the
>>> website, interface with SOLR, and display the results back on the
>> website.
>>> If I use PHP, it seems that all the solutions use some form of character
>>> based stream for the interface. It would seem that using a binary
>>> representation, such as javabin, would be more efficient.
>>>
>>> If using javabin, or some similar efficient binary stream to interface
>> SOLR
>>> with PHP is not possible, what do people recommend as the most efficient
>>> solution that provides the best performance, even if that means not using
>>> PHP and going with some other alternative?
>> I'd recommend going with JSON - it will be quite a bit smaller than
>> XML, and the parsers are generally quite efficient.
>>
>> -Yonik
>> http://lucenerevolution.org Lucene/Solr Conference, Boston Oct 7-8
>>
Re: SOLR interface with PHP using javabin?
Posted by Thomas Joiner <th...@gmail.com>.
If you wish to interface to Solr from PHP, and decide to go with Yonik's
suggestion to use JSON, I would suggest using
http://code.google.com/p/solr-php-client/
It has served my needs for the most part.
On Thu, Sep 16, 2010 at 1:33 PM, Yonik Seeley <yo...@lucidimagination.com>wrote:
> On Thu, Sep 16, 2010 at 2:30 PM, onlinespending@gmail.com
> <on...@gmail.com> wrote:
> > I am planning on creating a website that has some SOLR search
> capabilities
> > for the users, and was also planning on using PHP for the server-side
> > scripting.
> >
> > My goal is to find the most efficient way to submit search queries from
> the
> > website, interface with SOLR, and display the results back on the
> website.
> > If I use PHP, it seems that all the solutions use some form of character
> > based stream for the interface. It would seem that using a binary
> > representation, such as javabin, would be more efficient.
> >
> > If using javabin, or some similar efficient binary stream to interface
> SOLR
> > with PHP is not possible, what do people recommend as the most efficient
> > solution that provides the best performance, even if that means not using
> > PHP and going with some other alternative?
>
> I'd recommend going with JSON - it will be quite a bit smaller than
> XML, and the parsers are generally quite efficient.
>
> -Yonik
> http://lucenerevolution.org Lucene/Solr Conference, Boston Oct 7-8
>
Re: SOLR interface with PHP using javabin?
Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Thu, Sep 16, 2010 at 2:30 PM, onlinespending@gmail.com
<on...@gmail.com> wrote:
> I am planning on creating a website that has some SOLR search capabilities
> for the users, and was also planning on using PHP for the server-side
> scripting.
>
> My goal is to find the most efficient way to submit search queries from the
> website, interface with SOLR, and display the results back on the website.
> If I use PHP, it seems that all the solutions use some form of character
> based stream for the interface. It would seem that using a binary
> representation, such as javabin, would be more efficient.
>
> If using javabin, or some similar efficient binary stream to interface SOLR
> with PHP is not possible, what do people recommend as the most efficient
> solution that provides the best performance, even if that means not using
> PHP and going with some other alternative?
I'd recommend going with JSON - it will be quite a bit smaller than
XML, and the parsers are generally quite efficient.
-Yonik
http://lucenerevolution.org Lucene/Solr Conference, Boston Oct 7-8