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 Jack L <jl...@yahoo.ca> on 2007/04/16 00:47:28 UTC

Python utilities for solr?

Doing queries is so easy with Python, thanks to solr's
Python format support. Is there any Python utility classes for
posting documents? Which I think, is essentially a Python
class to generate XML documents (before JSON support is available)
from Python objects. Then again, JSON for posting would be
really nice to have :)

-- 
Best regards,
Jack


Re: solr.py - set boosts?

Posted by Mike Klaas <mi...@gmail.com>.
On 5/3/07, Jack L <jl...@yahoo.ca> wrote:
> I've been using solr.py to post and search. It works well.
> Is it possible to specify doc boost and field boost with it?

Not currently, but there is an improved client in the works which you
can try here:

http://issues.apache.org/jira/browse/SOLR-216

-Mike

solr.py - set boosts?

Posted by Jack L <jl...@yahoo.ca>.
I've been using solr.py to post and search. It works well.
Is it possible to specify doc boost and field boost with it?

Jack

Erik> There is a solr.py in the Solr clients directory:
Erik> http://svn.apache.org/repos/asf/lucene/solr/trunk/client/python/solr.py
Erik> It's got some utility methods for generating <field>'s.

Mike> It is not documented very well, but you can pass in a multi-map to the
Mike> solr.py client:

Mike> .add(field_one=['one', 'two', 'three'], field_two='value', ...)



Re[2]: Python utilities for solr?

Posted by Jack L <jl...@yahoo.ca>.
Mike and Erik, thanks for the reply. Excellent. I'll try it out.

> On 4/15/07, Jack L <jl...@yahoo.ca> wrote:
>> Doing queries is so easy with Python, thanks to solr's
>> Python format support. Is there any Python utility classes for
>> posting documents? Which I think, is essentially a Python
>> class to generate XML documents (before JSON support is available)
>> from Python objects. Then again, JSON for posting would be
>> really nice to have :)

> It is not documented very well, but you can pass in a multi-map to the
> solr.py client:

> .add(field_one=['one', 'two', 'three'], field_two='value', ...)

> -Mike


Re: Python utilities for solr?

Posted by rubdabadub <ru...@gmail.com>.
There is also this .. I discovered it when i was trying to find some
djngo - solr working example..

http://code.google.com/p/fac-back-opac/

Cheers

On 4/16/07, Mike Klaas <mi...@gmail.com> wrote:
> On 4/15/07, Jack L <jl...@yahoo.ca> wrote:
> > Doing queries is so easy with Python, thanks to solr's
> > Python format support. Is there any Python utility classes for
> > posting documents? Which I think, is essentially a Python
> > class to generate XML documents (before JSON support is available)
> > from Python objects. Then again, JSON for posting would be
> > really nice to have :)
>
> It is not documented very well, but you can pass in a multi-map to the
> solr.py client:
>
> .add(field_one=['one', 'two', 'three'], field_two='value', ...)
>
> -Mike
>

Re: Python utilities for solr?

Posted by Mike Klaas <mi...@gmail.com>.
On 4/15/07, Jack L <jl...@yahoo.ca> wrote:
> Doing queries is so easy with Python, thanks to solr's
> Python format support. Is there any Python utility classes for
> posting documents? Which I think, is essentially a Python
> class to generate XML documents (before JSON support is available)
> from Python objects. Then again, JSON for posting would be
> really nice to have :)

It is not documented very well, but you can pass in a multi-map to the
solr.py client:

.add(field_one=['one', 'two', 'three'], field_two='value', ...)

-Mike

Re: Python utilities for solr?

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
There is a solr.py in the Solr clients directory:

	http://svn.apache.org/repos/asf/lucene/solr/trunk/client/python/solr.py

It's got some utility methods for generating <field>'s.

	Erik


On Apr 15, 2007, at 6:47 PM, Jack L wrote:

> Doing queries is so easy with Python, thanks to solr's
> Python format support. Is there any Python utility classes for
> posting documents? Which I think, is essentially a Python
> class to generate XML documents (before JSON support is available)
> from Python objects. Then again, JSON for posting would be
> really nice to have :)
>
> -- 
> Best regards,
> Jack