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 8894351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:28:25+00:00 2026-06-14T23:28:25+00:00

I am using Solr Grouping result. But it behaves wrong. I grouped on the

  • 0

I am using Solr Grouping result. But it behaves wrong.

enter image description here

I grouped on the base of email field. In my database i have 2 rows for the email address “ashhaf63@hotmail.com” but SOLR showing 7147 numFound which is of course wrong, it should be 2.

When i try to search with particular email address like “ashhaf63@hotmail.com” with grouping then it shows perfect result and it shows 2 in the numFound attribute which is correct.

enter image description here

I believe that, it is because of field type in my Solr schema, i was using text field type in start but i have changed it to my own field type now. I have defined my own field type and using my own field type now.

enter image description here

enter image description here

After using my own field type, i am facing same issue.

  • 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-14T23:28:26+00:00Added an answer on June 14, 2026 at 11:28 pm

    If you look at your grouping response, you will see it matched 7147 documents because the group consists of all emails that have “hotmail” in their address <str name="groupValue">hotmail</str> and not the entire email address. This behavior is because you are expecting the values in the fields to be indexed as complete strings, like “ashhaf63@hotmail.com”, but from the definition of your email fieldType you are doing some tokenizing of the field values. That is resulting in multiple indexed values for that field. Specifically the StandardTokenizerFactory that splits a value on all non alphanumeric characters. So that same email address is being indexed as three separate values, “ashhaf63”, “hotmail” and “com”.

    Because of this, I would recommend creating a new field that uses a simple string fieldType like the following:

    <!-- The StrField type is not analyzed, but indexed/stored verbatim. -->
    <fieldType name="string" class="solr.StrField" sortMissingLast="true" />
    

    Then create a new field like this:

    <field name="emailaddress" type="string" stored="true" indexed="true"/>
    

    Then perform your grouping on this new emailaddress field, which will group on the entire email address value.

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

Sidebar

Related Questions

I'm using Solr for search. I have documents that have an integer field popularity
I am using solr 4.0 and have the following query : http://localhost:8987/solr/select/?q=priority%3A*&version=2.2&start=0&rows=0&indent=on&facet=on&facet.field=priority&facet.mincount=1 This returns
I am using Result Grouping into the SOLR. How can i get the total
The scene: I have indexed many websites using Nutch and Solr. I've implemented result
I have been using solr search and now I am adding pagination via the
I am working on making a book catalog searchable using Solr. I have written
Im using Solr 3.5.0, and in Schema I have enabled the LowerCaseFilterFactory in all
I'm using Solr and I want to facet over a field group. Since group
I use grouping with solr 3.3 and solrnet. I want to paginate results using
Using Solr 4.0 I have the following query: (family_name:(Brown) OR maiden_name:(Brown)^0.5) AND ( source:HIGHQUALITY^3000

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.