Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3698302
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:57:53+00:00 2026-05-19T04:57:53+00:00

I have been working on making a Search using Solrnet which is working the

  • 0

I have been working on making a Search using Solrnet which is working the way I want to. But I just would like some advice on the best way to pass my query parameters from my web page into Solrnet.

What I would ideally like to do is pass my query string parameters similar to how this site does it: http://www.watchfinder.co.uk/SearchResults.aspx?q=%3a&f_brand=Rolex&f_bracelets=Steel&f_movements=Automatic.

As you can see from the sites query string it looks like it is being passed into SolrNet directly. Here is I am doing it at the moment (facet query segment):

public class SoftwareSalesSearcher
    {
        public static SoftwareSalesSearchResults Facet()
        {
            ISolrOperations solr = SolrOperationsCache.GetSolrOperations(ConfigurationManager.AppSettings["SolrUrl"]);

        //Iterate through querystring to get the required fields to query Solrnet
            List queryCollection = new List();
            foreach (string key in HttpContext.Current.Request.QueryString.Keys)
            {
                queryCollection.Add(new SolrQuery(String.Format("{0}:{1}", key, HttpContext.Current.Request.QueryString[key])));
            }

            var lessThan25 = new SolrQueryByRange("SoftwareSales", 0m, 25m);
            var moreThan25 = new SolrQueryByRange("SoftwareSales", 26m, 50m);
            var moreThan50 = new SolrQueryByRange("SoftwareSales", 51m, 75m);
            var moreThan75 = new SolrQueryByRange("SoftwareSales", 76m, 100m);

            QueryOptions options = new QueryOptions
            {
                Rows = 0,
                Facet = new FacetParameters {
                    Queries = new[] { new SolrFacetQuery(lessThan25), new SolrFacetQuery(moreThan25), new SolrFacetQuery(moreThan50), new SolrFacetQuery(moreThan75) }
                                            },
                FilterQueries = queryCollection.ToArray()
            };


            var results = solr.Query(SolrQuery.All, options);

            var searchResults = new SoftwareSalesSearchResults();

            List softwareSalesInformation = new List();

            foreach (var facet in results.FacetQueries)
            {
                if (facet.Value != 0)
                {
                    SoftwareSalesFacetDetail salesItem = new SoftwareSalesFacetDetail();

                    salesItem.Price = facet.Key;
                    salesItem.Value = facet.Value;

                    softwareSalesInformation.Add(salesItem);
                }

            }

            searchResults.Results = softwareSalesInformation;
            searchResults.TotalResults = results.NumFound;
            searchResults.QueryTime = results.Header.QTime;

            return searchResults;
        }       

    }

At the moment I can’t seem to see how I can query all my results from my current code by add the following querystring: q=:.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T04:57:54+00:00Added an answer on May 19, 2026 at 4:57 am

    I’m not sure what you mean by “parameters being passed into SolrNet directly”. It seems that watchfinder is using some variant of the model binder included in the SolrNet sample app.

    Also take a look at the controller in the sample app to see how the SolrNet parameters are built.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working with Struts for some time, but for a project I
I have been working for some time on a library which performs numeric calculations.
I have been working with Visual Studio (WinForm and ASP.NET applications using mostly C#)
I have been working on some legacy C++ code that uses variable length structures
I have been working with relational databases for sometime, but it only recently occurred
I have a project that I have been working on for a while, just
i have a input tag which is non editable, but some times i need
I have been working on making our .NET application FIPS compliant, and have found
I have been working on making our CMS export valid content for mobile devices.
I have been working on a web services related project for about the last

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.