c# - SolrNet OR query -


i trying query records parentid = thread or dataid = thread. query keeps timing out on me. there wrong query below?

var test = solr.query(new solrquerybyfield("parentid", thread) ||                      (new solrquerybyfield("dataid", thread))); 

i not expert in solr.net have used 1 project. can suggest try couple of things.

first go solr admin , try executing query:

(parentid:"thread") or (dataid:"thread") 

if result , not timing out, can use same string in solr.net like:

string strquery = "(parentid:\"thread\") or (dataid:\"thread\")";  // or use * contains instead of double quotes var query = new solrquery(strquery); sortorder sortorder = new sortorder("parentid"); var solrqueryresult = solr.query(query, new queryoptions     {         rows = 100, //max rows returned         start = 0,         orderby = new[] { sortorder }, //if want ordered result     });  var list = solrqueryresult.tolist();//if want list 

Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -