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

  • SEARCH
  • Home
  • 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 7731755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:33:38+00:00 2026-06-01T06:33:38+00:00

I want to get the information that is returned by this query from SolrNet:

  • 0

I want to get the information that is returned by this query from SolrNet:

http://localhost:8983/solr/terms?terms.fl=Title&terms.sort=index&terms.limit=10000&terms.mincount=10&version=2.2

Solr has support for specifying the terms parameters, but I don’t know how to retrieve the terms information. Executing a query goes to the select query handler, which throws an error. Here is what I have so far:

var solr = ServiceLocator.Current.GetInstance<ISolrOperations<ProductAdvertisementWidget>>();
int termLimit = 10000;
int minCount = 10;
var termParameters = new TermsParameters("Title");
termParameters.MinCount = minCount;
termParameters.Limit = termLimit;
termParameters.Sort = TermsSort.Index;            
var options = new QueryOptions()
      {
      Terms = termParameters,
      Rows = 0
      };

var queryOptions = new QueryOptions();
queryOptions.Terms = termParameters;
int lastResultCount = termLimit;

IEnumerable<KeyValuePair<string, int>> terms =
    solr.Query(new SolrQuery(""), options).Terms.FirstOrDefault(
    x=>x.Field == SolrFieldMappings.Name).Terms; 

SolrNet translates that into this query, which fails:

http://localhost:8983/solr/select?q=&terms.fl=Title&terms.sort=index&terms.limit=10000&terms.mincount=10&version=2.2

The error message is:

HTTP ERROR 500

Problem accessing /solr/select. Reason:

null

java.lang.NullPointerException at java.io.StringReader.(Unknown
Source) at
org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:203)
at
org.apache.solr.search.LuceneQParser.parse(LuceneQParserPlugin.java:80)
at org.apache.solr.search.QParser.getQuery(QParser.java:142) at
org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:81)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:173)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1368) at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:356)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:252)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326) at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549) at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582

)

  • 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-06-01T06:33:39+00:00Added an answer on June 1, 2026 at 6:33 am

    This NullPointerException is a bug in Lucene, please report it. Lucene should not throw such a generic NullPointerException without any other information to help the user find the cause. Consider submitting a patch.

    That said, you should not pass an empty query to Solr. Use SolrQuery.All with 0 rows instead if you only want terms information.

    Also make sure you have the TermsComponent correctly configured in the default Solr request handler.

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

Sidebar

Related Questions

I want to make one project that parse wiki pages and get needed information
I want to get show information from myspace artists. One way I could do
Just I am learning MVC,(ofcourse i get enough information from MS Website).I want to
I am making restful requests in my silverlight app, I want to get information
I want to get all folder information of root directory in C#.
I want get all of the Geom objects that are related to a certain
I want get as much as possible from Redis + Hiredis + libevent. I'm
I am trying to check a field in some XML that is returned from
I have a cursor that is used to get some preliminary information for some
I want to preface this question with the fact that I am a student

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.