开发者

How to query in solrNet

I am new to solrnet . i need to Pass this url to solr to my "pharmaSearch" requestHandler and i need to get the result xml . guide how to do this in solrNet(Now for the url it is working in brower) where else i need to call this from .net application

http://localhost:9090/solrSDIS/study/pharmaSearch/?&Eq=(A*B*C)&ExpTerm=A,B,C&QueryLevel=2,2,1&q=526:(27747) AND (1028:[10 TO 27]) AND (469:[-10 TO 742]) AND 523:("Body Weights") AND 262:n , (518:"27058") AND (430:((Necrosis))) AND 523:("Microscopic Findings") AND 262:n ,(169:"7631")开发者_开发百科&scope=2 Let me know if you need any details ...

Advance Thanks .


You can pass the name of your handler by using the ExtraParams parameter in the QueryOptions as shown in the addition parameters section here:

http://code.google.com/p/solrnet/wiki/Querying

...
ExtraParams = new Dictionary<string, string>
{
   {"qt", "paramSearch"},
   {"Eq", "(A*B*C)" },
   ...
}
...

You can build up a fluent query as shown in the documentation for solrnet here:

http://code.google.com/p/solrnet/wiki/DSL

... Query.Field("523").Is("Body Weights") && Query.Field("469").From(-10).To(742) && ...

The documentation contains everything you need to compose your query.


You need to read the documentation on the SolrNet Google Code Home Page - http://code.google.com/p/solrnet to learn the basics of using SolrNet so that you can map your solr rest query above to the appropriate SolrNet syntax.

I would suggest starting with the Basic Usage page as this gives a very nice sample of executing a search against solr. Then you can leverage the answer above by @SteadyEddi to call your custom request paraeters.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜