lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alejandro Marqués Rodríguez <>
Subject Re: partial word searching
Date Wed, 21 Apr 2010 07:52:21 GMT

You can use wildcards but I suppose it would only work with one word (though
maybe if you use tokenization you could use something like "field:sun* AND

You could also use N-grams to achieve partial searchs. For example, if you
use 3-grams for "hotel" you'll index "hot", "ote" and "tel", so you could
find "hotel" searching for any of those three strings.

There's a N-gram filter you could apply though I don't know how it works
when retrieving N-grams from a more than one word expression:
<filter class="solr.NGramFilterFactory" minGramSize="3" maxGramSize="15"/>

Again I suppose if you use a tokenizer first you could get the next 3-grams
"hot" "ote" "tel" "sun" unw" "nwa" "way" and therefore searching for
"field:sun AND field:hot" will retrieve the "sunway hotel" document.


2010/4/21 Chamnap Chhorn <>

> Hi everyone,
> I'm quite new to solr 1.4. I have a requirement to be able to search
> partial
> words ("sun hot" => "Sunway Hotel") and to search full word("sunway hotel"
> => "Sunway Hotel"). Currently, I could be able to search only full word.
> Anyone has any suggestions?
> --
> Chhorn Chamnap

Alejandro Marqués Rodríguez

Paradigma Tecnológico
Avenida de Europa, 26. Ática 5. 3ª Planta
28224 Pozuelo de Alarcón
Tel.: 91 352 59 42

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