Closed mazz closed 5 years ago
@mazz is looks like nothing is starting Giza's application. Are you running Giza on it's own? I'm usually testing it as a library in my applications supervisor tree but you can start it manually the way you describe like so:
iex(1)> _ = Giza.Application.start_link()
{:ok, #PID<0.234.0>}
iex(2)> alias Giza.SphinxQL
Giza.SphinxQL
iex(3)> SphinxQL.new() |> SphinxQL.from("test1") |> SphinxQL.match("test") |> SphinxQL.send()
Let me know if that works for you. If you are using Giza as a library in your own app, your own application file will look something like this:
def init(_) do
import Supervisor.Spec
children = [supervisor(Giza.Application, [])]
Supervisor.init(children, strategy: :one_for_one)
end
Let me know if that works or I can take a closer look
I knew it was 'pilot error', appreciate taking the time to show me something not obvious to a noob like me. :)
Thanks for updating the issue. Happy to hear from anyone using Sphinx. Don't hesitate to chat about any other issue or comment on the experience
I checked-out the project, ran
mix deps.get
,mix deps.compile
,iex -S mix
running the query below results in:
iex(3)> SphinxQL.new() |> SphinxQL.from("test1") |> SphinxQL.match("test") |> SphinxQL.send()
I've confirmed that
sphinxsearch
is running and can do a query viamysql -h0 -P9306
andmysql> CALL KEYWORDS ('test', 'test1', 1);
Not sure why it's not firing-up, if I look in
application.ex
: