lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michel Bottan <>
Subject Re: weird problem with letters S and T
Date Thu, 29 Oct 2009 12:09:24 GMT
Hi Joel,

If you intend querying for the TITLE which starts with specifics letters, I
have another solution which seems to be easier, since you don't need a
specific field for the first letter.

1. Create a new type in your schema.xml using the following analyzer

    <fieldType name="text_sort" class="solr.TextField"
        <tokenizer class="solr.KeywordTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.ISOLatin1AccentFilterFactory"/>
        <filter class="solr.TrimFilterFactory"/>
        <filter class="solr.PatternReplaceFilterFactory"
pattern="([^a-zA-Z0-9])" replacement="" replace="all"/>

2. Create a copy field from its original

    <field name="title_sort"        type="text_sort" indexed="true"

<copyField source="title"           dest="title_sort"/>

3. Use Filter Quey to filter

i.e. &fq=title_sort:[a TO b]&s=title_sort asc (títulos começando em A até N)

4. Read field value for presentation from the original field

Michel Bottan

On Thu, Oct 29, 2009 at 1:23 AM, Norberto Meijome <>wrote:

> On Wed, 28 Oct 2009 19:20:37 -0400
> Joel Nylund <> wrote:
> > Well I tried removing those 2 letters from stopwords, didnt seem to
> > help, I also tried changing the field type to "text_ws", didnt seem to
> > work. Any other ideas?
> Hi Joel,
> if your stop word filter was applied on index, you will have to reindex
> again (at least those documents with S and T).
> If your stop filter was *only* on query, then it should work after you
> reloaded your app.
> b
> _________________________
> {Beto|Norberto|Numard} Meijome
> "Those who do not remember the past are condemned to repeat it."
>   George Santayana
> I speak for myself, not my employer. Contents may be hot. Slippery when
> wet. Reading disclaimers makes you go blind. Writing them is worse. You have
> been Warned.

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