![]() Lucene's phrase search would work for this example, but how about when they enter "Pirates of th" or "Pirat" or. In search suggest, if your users input "Pirates of the" in your search box, you want them to get the suggestion "Pirates of the Caribbean". This is a very useful feature for finding results based on partial phrases, however this is not close to being enough when it comes to "search suggest" and I'm going to explain why. Using Lucene you can search for phrases within your index by building a lucene query such as title:"pirates of the" where the field you want to search is called "title". In this blog post I will identify the challenges Oshyn had to overcome when implementing this feature with Solr and will demonstrate the solutions to finally implementing a solid "Google like" search suggest in your site.ġ) Dealing with lack of support for wild card searches on phrase queries:Ī "Phrase" as defined by the Lucene documentation on ( ) is a group of words surrounded by double quotes such as "hello dolly". However when it comes to a feature such as search suggest a different story arises and there are many variables to take into account to get a successful "search suggest" working in your site. Solr provides several methods for querying the index through XML/HTTP and JSON APIs that are ideal for a search suggest feature where the browser will be making several AJAX calls on every user input.Ĭonfiguring Solr is not a challenge and is very well documented. In short words, Solr works as a Lucene based web application that can be deployed to any Java servlet container. With these obvious requirements in mind, Oshyn turned to Apache's Solr enterprise search server. Needless to say there are many, many movies/tv shows to search for on such site and it is imperative to allow users to find what they are looking as fast as possible and with the least trouble. One of Oshyn's latest successful projects () relies heavily on its "search suggest" feature for providing a user-friendly search to all available titles in the site. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |