The Solr Wildcard Problem And Multiterm Solution

A while ago I ran into a problem with Solr and wildcard searches. Turns out it's more of a little known fact than a problem, Solr treats wildcards a bit different than how one would expect.

Normally, when a user enters a search-term we will append '*' to it so it will find words starting with the term that is being searched for. Common sense dictates that when someone searches for "train*", the set of results will also contain the word "train" itself. But "train" is not part of the results. When looking for "train*" Solr will return "trainer", "training", "trains" but it won't return results with the word "train" in it.

In case you want documents matching the exact word as well you will have to change your Solr statement. Instead of searching for "word*" you'll have to look for "word OR word*", only then documents matching "word" will turn up in the result-set.

After discussing it with Nick Veenhof, it turns out that, as of Solr 3.6 there's been a new type of analyser introduced that addresses this shortcoming (although it seems to be more of a side-effect). The multiterm analyser type. Copy the query analyzer section of the text fieldType and change the type to "multiterm". What multiterm addresses is that when you look for "train*" it will run the query as if you've been searching for "train", "trains", "training", "trainer". You might be inclined to think that that's the same as searching for anything that starts with "train", but that is not the case. Without specifying the multiterm analyser the wildcard searches are not analysed at all and thus can't be used for stemming, or downcasing or accent mapping...

Specifying the new multiterm analyser will also "expand" the wildcard search to the actual word, in our case "train", which is what we were looking for.

In case you're using Drupal to interface with Solr there's an issue filed about this along with a simple example explaining the difference between a non-analysed wildcard search and a multiterm search.

Comments

When looking for "train*" Solr will return "trainer", "training", "trains" but it won't return results with the word "train" in it. I am gald to find this article. hi!,I really like your writing very so much! share we keep in touch more about your post on AOL? I require an expert on this house to unravel my problem. May be that’s you! Taking a look ahead to look you. http://www.bestdvdland.com/

Wow..... Really informative blog article.
Spokane Video Weddings

New music instruction commonly starts with elementary educational institutions where little ones are taught the best way to play instruments such as keyboard, play in choirs or maybe school represents, and discover more about the things and heritage of new music. In school, music education may continue as part of the curriculum. neighborhoodacademyofmusic.net

instruction commonly starts with elementary educational institutions where little ones are taught the best way to play instruments such as keyboard, play in choirs or maybe school represents Get Traffic

This is a nice post in an interesting line of content.Thanks for sharing this article, great way of bring this topic to discussion.
SEO Manchester

Merawat printer akan membantu anda memperpanjang usia dari alat cetak ini. Anda bisa mendapatkan spareparts dari printer yang anda inginkan jika anda hanya ingin melakukan perawatan printer. Hanya saja pada umumnya spareparts ini tidak tersedia di tempat umum dan harus dipesan online. sparepart printer murah . lihat perlengkapan printer lainnya di sini kunjungi website kami .
Jika anda ingin melakukan aktifitas wisata yang menyenangkan, maka sebaiknya anda menyewa jasa wisata. Karena anda akan mendapatkan paket wisata yang biayanya ringan dan pelayanannya profesional. Jadi sekarang coba lakukan pemesanan. Paket Wisata Dieng Wonosobo . dapatkan penawaran paket wisata lainnya di sini silahkan baca selengkapnya .
Apakah anda membutuhkan bantuan untuk mendapatkan gems, atau xp atau food di dragon city? Jangan kuatir karena saat ini sudah ada layanan joki dragon city yang akan membantu anda mendapatkan semuanya itu. Jual Dragon City Food . lihat penawaran lainnya klik di sini .
Untuk melakukan kegiatan outbound yang berkelas anda perlu menyewa jasa pelatihan outbound yang profesional. Hal ini sangat penting untuk menjamin keselamatan para peserta outbound. Ada beberapa layanan outbound yang tersedia saat ini. paket outbound bogor . butuh paket outbound yang lengkap? kunjungi blog .
Jika anda berusaha mengadakan bisnis konveksi baju seragam kantor, maka kami menyediakan jasa konveksi dengan harga murah dan kualitas jahitan yang sangat rapi. Jika anda tertarik, silahkan melihat koleksi dari baju kerja kantor yang kami miliki. Tas seminar Jakarta . Silahkan cek koleksi model tas kami lihat artikel .
Jerawat adalah salah satu masalah yang kerap kali membuat wanita kehilangan rasa percaya diri. Oleh karena itu saya mau memperkenalkan bps yaitu sebuah krim perawatan kecantikan yang bisa membantu anda menghilangkan jerawat yang membandel Jual Online BPS . baca informasi selengkapnya produk majakani ini baca artikel .

Roller Shutters
Hi, just wanted to say I attended this conference last year, and found it by far the best of about 8 conferences that I attended in the field. Full of professional insight based on testing by experts that knew what they were talking about. I would certain

Solar and wildcard searches often create a problem and this has been stressed over and over again that these things must be fixed according to the guidelines. green news

Di dalam tiap perkantoran ada banyak aktifitas yang membutuhkan tunjangan alat tulis kantor yang memadai. Tidak adanya suply yang terjamin bisa membuat anda kesulitan beraktifitas. Jadi jika anda memerlukan alat tulis kantor anda bisa melakukan pemesanan secara online dan mendapatkan harga terbaik dari kami. jual online alat tulis kantor . pesan alat tulis kantor di sini lihat penjelasan lengkapnya .
Laptop adalah peralatan kerja mobile yang bisa memungkinkan anda melakukan aktifitas kerja di mana saja. Namun untuk membawa laptop anda membutuhkan tas laptop demi kemudahan dan keamanan laptop saudara. Jadi coba dapatkan di toko tas laptop online ini. jual tas bonjour . jual tas laptop dengan harga murah read more .
Olahraga adalah aktifitas yang akan menguras keringat saudara, dan oleh karena itu ada baiknya anda menggunakan baju kaos olahraga yang berkualitas. Baju ini bisa membantu anda menyerap keringat selama olahraga . grosir seragam olahraga . pesan grosir kaos olahraga dan cek modelnya lihat penawaran kami .
Untuk membangun sebuah blog yang SEO friendly anda membutuhkan template blog yang juga SEO friendly dan saat ini salah satu kriteria blog yang SEO friendly adalah responsive design karena akan mudah menyesuaikan dengan layar pengguna internet. Template blog SEO friendly yang responsive . pelajari lebih lanjut cara membuat blognya download di sini .
Wanita saat ini mempunyai selera busana yang sangat kompleks dan semakin jenuh untuk mencarinya di mal atau pasar. Dengan adanya kemajuan teknologi, maka semakin banyak orang yang melakukan belanja online untuk sepatu ataupun baju wanita. jual online aksesoris wanita . silahkan lihat koleksi baju wanita dan sepatu lainnya baca di sini .

I researed valuable information on this point as I am working on a class project. Thank you posting useful information and its now becoming easier to accomplish this task.
best fish oil

In case you want documents related the complete concept likewise you'll have to transform your current Solr declaration. As opposed to seeking "word*" you must search for "word AS WELL AS word*", merely then documents related "word" will certainly generate from the result-set. purple wedding flowers can be a great colour pertaining to wedding party plants. It may are the palest lavender with a vibrant pink with a royal eggplant tone, plus a huge variety of plants can be bought in pink. Through candelabras in order to blossoms in order to blossom ladies, these include many of the lovliest pink wedding party plants.

You may post on the professional credentials for the blog owner. You could express it's outstanding. Your blog experience can springboard your click through.

Its a great pleasure reading your post.Its full of information I am looking for and I love to post a comment that "The content of your post is awesome" Great work

I agree on this totally. School matters! design stühle

Learn what steps to take in order to save money during a recession. Are there ways of saving money during a recession? Recession is a word that has a negative meaning for many people; it fills many people full of a dreadful fear of loss. People are scared that it means www.financialaidaudit.com

Massage Tucson
Innovation has nothing to do with how many R amp&; D dollars you have. When Apple came up with the Mac, IBM was spending at least 100 times more on R & D. It's not about money. It's about the people you have, how you're led, and how much you get it.

In case you want documents matching the exact word as well you will have to change your Solr statement. Instead of searching for "word*" you'll have to look for "word OR word*", only then documents matching "word" will turn up in the result-set.

Most Popular Websites

Your article has piqued a lot of positive interest. I can see why since you have done such a good job of making it interesting.
how to unlock iphone 4 when disabled

It is good to see the consumer sales of furniture up in the United States, but it is also unfortunate because all of this furniture isn't made in the US anymore. All we're doing is adding to the deforestation of Southeast Asia and the trade deficits here the United States. No, we don't live in a perfect world, www.furnituresaleillinois.com

Find Inspiring Quotes On Facebook. It's Quick, Easy & Free. Join Now!
arabchat

I definitely enjoying every little bit of it. It is a great website and nice share. Jual Mobil Hotwheels

One secret of success in life is for a man to be ready for his opportunity when it comes.
Peter J. Burns III

Flaming enthusiasm, backed up by horse sense and persistence, is the quality that most frequently makes for success.
amber teething necklace

Success is getting what you want. Happiness is wanting what you get.
mobilieji telefonai

Great job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too. There tend to be not many people who can certainly write not so simple posts that artistically. Continue the nice writing
double stroller reviews

Buying cost helpful tour package to have some stress-free time off from your each day routine? We during cheap family vacation package understand the additional value of your hard earned money and offer array with cheap go deals. incredibleholiday.net

When everything else physical and mental seems to diminish, the appreciation of beauty is on the increase.
Timber Merchants Liverpool

Your website is really cool and this is a great inspiring article. Thank you so much.
medical alert bracelets

Admiring the time and effort you put into your blog and detailed information you offer!..
best electric razor

I tally this statement. During I opened this locale, I sense very comfy to acquire this cognizance. http://onj.me/1wjsd

When your trucks cart goods all over town or within the nation, you must protect a person's drivers, cars or trucks, and others on the streets. Since a person's trucks plus vans go multiple miles on a daily basis, you want fairly in depth commercial insurance. insuranceconnectionsinc.net

There is no question that instantaneous water heaters are good options to trust in terms of their water heating services. However, you need to know that not all kinds of this water heater will work best for you.
Tablet Covers

We live in a wonderful world that is full of beauty, charm and adventure. There is no end to the adventures that we can have if only we seek them with our eyes open.
Buy Facebook Fans

When everything else physical and mental seems to diminish, the appreciation of beauty is on the increase.
Double Glazing Preston

What beauty is, I know not, though it adheres to many things.
Roller Shutters

Lots of people think that with the ability to get from the obsession from drugs plus alcohol set up. When they practice light converse and would make conversations about these materials, they currently have always implanted on the minds that it usually is done simple and fast. kernicterus-law.net

This article helps me a lot. It is useful. Your content is brilliant in my opinion. I think this is engaging and eye-opening material. I hope you will continue writing such a great articles.SEO Liverpool

You ability be likely to imagine that that's the ditto as searching for anything that originates along "trail", besides that is hardly the case. Minus specifying the multiterm analyser the wildcard searches are nay analysed at many besides thus can't be worn for stemming, or downcasing or dialect mapping... try this

I have been curious about this topic and decided to do some research. Your article has some useful information. Do you have any more on this subject?
online proxy

The first time I came here, less than 10 seconds the display is perfectly open, and the loading is completed less than 20 seconds and to open the article only took about 7 seconds. So I think this is very fast! Incredible! Trying to maintain!
Timber Merchants Manchester

You must know by now, your article goes to the nitty-gritty of the subject. Your clarity leaves me wanting to know more. Just so you know, i will immediately grab your feed to keep up to date with your online blog. Sounding Out thanks is simply my little
Double Glazing Blackpool

Thank you for this post. Thats all I are able to say. You most absolutely have built this blog website into something speciel. You clearly know what you are working on, youve insured so many corners.thanks
Franchises UK

Buy Cipro
Hi, Kas. I doubt that you summarized the paper correctly. You say they found patterns in the DNA, but they do not, as I see, deal with DNA at all, they deal with the genetic code.

Innovation has nothing to do with how many R amp&; D dollars you have. When Apple came up with the Mac, IBM was spending at least 100 times more on R & D. It's not about money. It's about the people you have, how you're led, and how much you get it. Kata kata , kata kata lucu , kata kata bijak , kata kata cinta , kata kata mutiara, kata kata romantis
, kebun

Online Pharmacy
Nice information, many thanks to the author. I believe that anyone who wants to know something about this topic will like the post.I really loved reading blog.

NARROLASH™ is the most versatile and flexible of all non-metallic lashing. It is one of the safest and most cost effective alternatives to steel strapping, chains, wire ropes and ratchet strapping.
tie downs

Your site looks really amazing
I need college homework help

Defeat is not the worst of failures. Not to have tried is the true failure.Provigil Online

Pages