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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:24:22+00:00 2026-05-26T16:24:22+00:00

I have text_general field in schema.xml <fieldType name=text_general class=solr.TextField positionIncrementGap=100> <analyzer type=index> <tokenizer class=solr.WhitespaceTokenizerFactory/>

  • 0

I have “text_general” field in schema.xml

<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
    <analyzer type="index">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
        <filter class="solr.LowerCaseFilterFactory"/>
    </analyzer>
    <analyzer type="query">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/><filter class="solr.LowerCaseFilterFactory"/>
    </analyzer>
</fieldType>

I have stored documents:

document1:
   spell = "contro un indice generale dei prezzi salito del 2, 1%. Rincari ben piщ evidenti, tra i prodotti da bar"
   testata = "Mattino di Padova (Il)"

document2:
   spell="con i prodotti di qualitа vinco la crisi dei consumi Farinetti: con"
   testata = "Italia Oggi"

document3
   spell = "convenienza Il 2008 porta i primi aumenti nei pre zi L'Ipercoop cresce il listino"
   testata = "Nuova Ferrara (La)"

“spell” and “testata” fields has a “text_general” type.

Searching working fine for me:

http://localhost:8080/solr/select?q={!type=edismax qf=spell v='co*'}

But with sorting exists some problem:

http://localhost:8080/solr/select?q={!type=edismax qf=spell v='co*'}&sort=testata desc

It returns me this result:

    document1:
       spell = "contro un indice generale dei prezzi salito del 2, 1%. Rincari ben piщ evidenti, tra i prodotti da bar"
       testata = "Mattino di Padova (Il)"

    document2:
       spell="con i prodotti di qualitа vinco la crisi dei consumi Farinetti: con"
       testata = "Italia Oggi"

    document3
       spell = "convenienza Il 2008 porta i primi aumenti nei pre zi L'Ipercoop cresce il listino"
       testata = "Nuova Ferrara (La)"

I don`t understand why my sorting working not properly. It should returns me result like this:

    document3
       spell = "convenienza Il 2008 porta i primi aumenti nei pre zi L'Ipercoop cresce il listino"
       testata = "Nuova Ferrara (La)"

    document1:
       spell = "contro un indice generale dei prezzi salito del 2, 1%. Rincari ben piщ evidenti, tra i prodotti da bar"
       testata = "Mattino di Padova (Il)"

    document2:
       spell="con i prodotti di qualitа vinco la crisi dei consumi Farinetti: con"
       testata = "Italia Oggi"
  • 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-26T16:24:22+00:00Added an answer on May 26, 2026 at 4:24 pm

    Sorting doesn’t work good on multivalued and tokenized fields.
    As testata has been defined with text_general field type, it will be tokensized and hence the sort would not work fine.

    Sorting can be done on the “score” of the document, or on any
    multiValued="false" indexed="true" field provided that field is either
    non-tokenized (ie: has no Analyzer) or uses an Analyzer that only
    produces a single Term (ie: uses the KeywordTokenizer)

    Source: http://wiki.apache.org/solr/CommonQueryParameters#sort

    Use string as the field type and copy the title field into the new field.

    <field name="testata_sort" type="string" indexed="true" stored="false"/>
    
    <copyField source="testata" dest="testata_sort" />  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a field in MySQL of type text, using the following collation: utf8_general_ci
I have tons of XML files all containing a the same XML Document, but
I have a class in my Prism/CAL application which generates a form for users
I have a project that is an open source application for a specific type
I have the following plugin, which takes a partial game name, bounces it off
I have added a new field named category with a text box in Catalog
General I have two kind of users, and one field (cluster) that I want
I have two ways to check from user: 1.if user input (Amount field <
I have a method that returns an array of custom class objects that are
I have created a text field to enter an amount of money. I want

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.