|
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 . |
| 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) |
|
|