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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:58:26+00:00 2026-06-05T04:58:26+00:00

What I’m looking for is an operation which would partially collapse my results so

  • 0

What I’m looking for is an operation which would “partially collapse” my results so that documents which have a certain field are grouped, removing what could be seen as near duplicates, but all docs missing this field remain unaffected by the field collapsing.

(Specifically, the docs in question are individual posts in a discussion forum, which in turn is organized in threads. Since the forum displays a whole thread per page, multiple hits in the same thread are essentially duplicates as far as the user is concerned and as a thread grows long, this is quite inevitable if the users stick to the subject. However, there are many other types of docs for which this collapsing does not make any sense at all.)

Using Solr 3.5, the closest I’ve gotten is

...&group=true&group.main=true&group.field=threadid&group.limit=3

but it appears that Solr is treating “missing” as a value and collapses everything else into 3 hits – I would like it to treat missing values as “unique”.

Can this be done or should I consider revising the schema design?

  • 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-05T04:58:28+00:00Added an answer on June 5, 2026 at 4:58 am

    I don’t think this is directly possible with the existing query parameters in solr.

    You have two options which might work:

    • Ensure each post has a threadid such that one-off posts have a unique threadid which does not conflict with the ‘normal’ threadids. When grouping on this field, these posts will show up in their own groups.

    • Run two queries, one with the grouping enabled, but an fq parameter which filters out posts without a threadid (e.g. fq=threadid:[* TO *]), then another query for only the non-threaded posts with an inverse fq (fq=-threadid:[* TO *]), then merge these results in your own code.

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

Sidebar

Related Questions

I would like to run a str_replace or preg_replace which looks for certain words
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I have a reasonable size flat file database of text documents mostly saved in
I am trying to loop through a bunch of documents I have to put
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I would like to count the length of a string with PHP. The string

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.