Illu
Illu

Reputation: 65

How can I use solrj to do a query with spellcheck

usually , we use http get method to do a spellcheck query, but now I have to use solrj to do this, pls help me to solve this question , thx.

Upvotes: 1

Views: 1658

Answers (2)

Yuval F
Yuval F

Reputation: 20621

Try the code in the Wiki page. I believe it does what you want.

Upvotes: 2

Karussell
Karussell

Reputation: 17375

You can specify all parameters via:

query.setParam("spellcheck", "true");
query.setParam("spellcheck.q", query);

Upvotes: 3

Related Questions