how to generate dynamic SolrQueryByField

164 Views Asked by At

based on the checkboxes selected, I want to query fields in SolrNet. I can have multiple checkboxes, for example, for field1, field2, field3, field4, etc.. so if the user selects field2 and field4, my solrquery is:

_solrquery = new SolrQueryByField("category", field2) || new SolrQueryByField("category", field4);

How do I create the above query dynamically depending upon the checkboxes selected which can be any combination? So I want to be able to append for example new SolrQueryByField("category", fieldX) to the above query

0

There are 0 best solutions below