Erlang/OTP Forums

Author Message

<  User Contributions  ~  esolr - erlang client to the Apache Solr search server

ppolv
Posted: Fri Feb 29, 2008 4:56 am Reply with quote
Joined: 17 Jan 2008 Posts: 2 Location: Argentina
A client for the Apache Solr search server http://lucene.apache.org/solr/.

(little)More info at
http://ppolv.wordpress.com/2008/02/29/esolr-an-erlang-text-search-client-library-for-apache-solr/
Sample usage:

>esolr:start_link().
{ok,<0.148.0>}
>esolr:add([{doc,[{id,”a”},{name,<<”Look me mom!, I’m searching now”>>}]}]).
ok
>esolr:add([{doc,[{id,”b”},{name,<<”Yes, searching from the erlang console”>>}]}]).
ok
>esolr:commit().
ok
>esolr:search(”search”,[{fields,”*,score”},{sort,[{id,asc}]},{highlight,”name”}]).
{ok,[{”numFound”,2},{”start”,0},{”maxScore”,0.880075}],
[{doc,[{”id”,<<”a”>>},
{”sku”,<<”a”>>},
{”name”,<<”Look me mom!, I’m searching now”>>},
{”popularity”,0},
{”timestamp”,<<”2008-02-28T23:42:15.642Z”>>},
{”score”,0.628625}]},
{doc,[{”id”,<<”b”>>},
{”sku”,<<”b”>>},
{”name”,<<”Yes, searching from the erlang console”>>},
{”popularity”,0},
{”timestamp”,<<”2008-02-28T23:43:26.997Z”>>},
{”score”,0.880075}]}],
[{”highlighting”,
{obj,[{”a”,
{obj,[{”name”,
[<<”Look me mom!, I’m <em>searching</em> now”>>]}]}},
{”b”,
{obj,[{”name”,
[<<”Yes, <em>searching</em> from the erlang “…>>]}]}}]}}]}[url][/url]

Not really well tested, use with care Wink.



esolr-0.1.tar.gz
 Description:
erlang client to the Apache Solr search server. pre-alpha

Download
 Filename:  esolr-0.1.tar.gz
 Filesize:  12.31 KB
 Downloaded:  735 Time(s)

View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
Post new topic

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum