lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Kanarsky <>
Subject Re: Searching with wrong keyboard layout or using translit
Date Thu, 28 Oct 2010 07:40:04 GMT

I think there is no single way to implement this. Some ideas that
might be helpful:

1. Consider adding additional terms while indexing. This assumes
conversion of Russian text to both "translit" and "wrong keyboard"
forms and index converted terms along with original terms (i.e. your
Analyzer/Filter should produce Moskva and Vjcrdf for term Москва). You
may re-use the same field (if you plan for a simple term queries) or
create a separate fields for the generated terms (better for phrase,
proximity queries etc. since it keeps the original text positional
info). Then the query could use any of these forms to fetch the
document. If you use separate fields, you'll need to expand/create
your query to search for them, of course.
2. If you have to index just an original Russian text, you might
generate all term forms while analyzing the query, then you could
treat the converted terms as a synonyms and use the combination of
TermQuery for all term forms or the MultiPhraseQuery for the phrases.
For Solr in this case you probably will need to add a custom filter
similar to SynonymFilter.

Hope this helps,

On Wed, Oct 27, 2010 at 1:31 PM, Pavel Minchenkov <> wrote:
> Hi,
> When I'm trying to search Google with wrong keyboard layout -- it corrects
> my query, example: (I typed word
> "Moscow" in Russian but in English keyboard layout).
> <>Also, when I'm searching using
> translit, It does the same:
> What is the right way to implement this feature in Solr?
> --
> Pavel Minchenkov

View raw message