lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: content disappears in the index
Date Mon, 12 Nov 2012 13:28:38 GMT
First, sorting on tokenized fields is undefined/unsupported. You _might_
get away with it if the author field always reduces to one token, i.e. if
you're always indexing only the last name.

I should say unsupported/undefined when more than one token is the result
of analysis. You can do things like use the KeywordTokenizer followed by
tranformations on the _entire_ input field (lowercasing is popular for

So somehow the analysis chain you have defined for this field grabs
and translates it into "a". Synonyms? Stemming? Some "interesting" sequence?

The fastest way to look at that would be in Solr's admin/analysis page.
Just put Arslanagic into the index box and you should see which of the
steps does the translation. Although changing it to "a" is really weird,
it's almost certainly something you've defined in the indexing analysis


On Mon, Nov 12, 2012 at 8:19 AM, Bernd Fehling <> wrote:

> Hi list,
> a user reported wrong sorting of our search service running on solr.
> While chasing this issue I traced it back through lucene into the index.
> I have a text field for sorting
> (stored,indexed,tokenized,omitNorms,sortMissingLast)
> and three docs with author names.
> If I trace at org.apache.lucene.document.Document.add(IndexableField) while
> indexing I can see all three author names added as field to each documents.
> After searching with *:* for the three docs and doing a sort the sorting
> is wrong
> because one of the author names is reduced to the first char, all other
> chars are lost.
> So having the authors names (Alexander, Arslanagic, Brennmoen) indexed,
> the result
> of sorting ascending is (Arslanagic, Alexander, Brennmoen) which is wrong.
> But this happens because the author "Arslanagic" is reduced to "a" during
> indexing (???)
> and if sorted "a" is before "alexander".
> Currently I use 4.0 but have the same issue with 3.6.1.
> Without tracing through tons of code:
> - which is the last breakpoint for debugging to see the docs right before
> they go into the index
> - which is the first breakpoint for debugging to see the docs coming right
> out of the index
> Regards
> Bernd
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message