Re: where is the SOLR_HOME ?

2011-09-22 Thread ahmad ajiloo
Thank you very much! It is working. Regards On Wed, Sep 14, 2011 at 4:14 PM, Juan Grande wrote: > Hi Ahmad, > > While Solr is starting it writes the path to SOLR_HOME to the log. The > message looks something like: > > Sep 14, 2011 9:14:53 AM org.apache.solr.core.SolrResourceLoader > > > INFO:

Re: how work with rss in solr?

2011-09-22 Thread nagarjuna
yaa Gora i set up rss feed to my blog and i have the following url for the rss feed of my blog http://nagarjunaavula.blogspot.com/feeds/posts/default?alt=rss http://nagarjunaavula.blogspot.com/feeds/posts/default?alt=rss u can check this url.then how to use this url in my solr application

Solr wildcard searching

2011-09-22 Thread jaystang
Hey guys, Very new to solr. I'm using the data import handler to pull customer data out of my database and index it. All works great so far. Now I'm trying to query against a specific field and I seem to be struggling with doing a wildcard search. See below. I have several indexed documents wit

Re: how work with rss in solr?

2011-09-22 Thread Gora Mohanty
On Fri, Sep 23, 2011 at 11:50 AM, nagarjuna wrote: > i didnt expect this answer . > Thank u very much for ur reply Gora > > i already saw that sampleafter completing my first stage self research > only i posted this post.i clearly know about that there is an example in > solr about the

Re: how work with rss in solr?

2011-09-22 Thread nagarjuna
i didnt expect this answer . Thank u very much for ur reply Gora i already saw that sampleafter completing my first stage self research only i posted this post.i clearly know about that there is an example in solr about the RSS in the example they used the url http://rss.slashdot.

levenshtein ranked results

2011-09-22 Thread Roland Tollenaar
Hi, I tried an internet search to find out how to query solr to get the results ranked (ordered) by levenshtein distance. This appears to be possible but I could not find a concrete example as to how I would have to formulate the query, or if its a schema setting on a particular field, how t

Re: how work with rss in solr?

2011-09-22 Thread Gora Mohanty
On Fri, Sep 23, 2011 at 11:02 AM, nagarjuna wrote: > Hi everybody > > Can anybody please explain me how to work with rss in solr? > what exactly i meant is, i have one blog and i need to get the updated posts > details using solr? > please provide me any samples or links.i have little bit

Re: Production Issue: SolrJ client throwing - Element type must be followed by either attribute specifications, ">" or "/>".

2011-09-22 Thread roz dev
Wanted to update the list with our finding. We reduced the number of documents which are being retrieved from Solr and this error did not appear again. Might be the case that due to high number of documents, solr is returning incomplete documents. -Saroj On Wed, Sep 21, 2011 at 12:13 PM, roz de

Re: OutOfMemoryError coming from TermVectorsReader

2011-09-22 Thread Otis Gospodnetic
Anand, But do you really want the whole log file to be a single Solr document (from a cursory look at the thread it seems that is the case).  Why not break up a log file into multiple documents? e.g. each log message could be one Solr document.  Not only will that solve your memory issues, but

Re: Different Solr versions between Master and Slave(s)

2011-09-22 Thread Otis Gospodnetic
Tommaso, We had a client (Italians, your countrymen, as a matter of fact) several months ago that we migrated from 1.4.* to 3.* if I recall correctly.  We used a tool that I think may still be just in JIRA to read docs from old Solr instance and index to the new Solr instance.  Ah, of course, a

Re: autocomplete with popularity

2011-09-22 Thread Otis Gospodnetic
Eugeny, I think you want something more useful and less problematic as Wunder already pointed out. Wouldn't you want your suggestions to be ordered by how close of match they are?  And do you really want them to be purely prefix-based like in your example? What if people are searching for Mic

RE: OutOfMemoryError coming from TermVectorsReader

2011-09-22 Thread Anand.Nigam
Hi, I am trying to index application log files and some database tables. Size of the log files range from 1 MB to 100 MB. Database tables also have few thousands of rows. I have used termvector highlighter for the content of the log files as mentioned below: Heap size : 10 GB OS: Linux, 64 b

Re: Multi-word searches in multi-valued fields

2011-09-22 Thread Otis Gospodnetic
Ron, Try "smith trucking"~N  where N is a number like 1 or 2 or 3 ... it's called phrase slop: http://search-lucene.com/?q=phrase+slop&fc_project=Lucene&fc_project=Solr Otis Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch Lucene ecosystem search :: http://search-lucene.com/ --

Re: Slow autocomplete(terms)

2011-09-22 Thread Otis Gospodnetic
Hi Roy, Try edge ngram instead. See also: http://sematext.com/products/autocomplete/index.html (comes with a nice UI, a bunch of configurable things, etc.) Otis Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch Lucene ecosystem search :: http://search-lucene.com/ - Original

Re: autosuggest combination of data from documents and popular queries

2011-09-22 Thread Otis Gospodnetic
Hello, >hi  >we already have autosuggest working using solr based on popular search >terms. Just terms of whole queries?  I assume the latter. >we use following approach.. >http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from-popular-queries-using-edgengrams/ > >Now we want to use d

Re: Slow autocomplete(terms)

2011-09-22 Thread abhayd
not sure if u already seen this but may be useful http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from-popular-queries-using-edgengrams/ -- View this message in context: http://lucene.472066.n3.nabble.com/Autocomplete-terms-performance-problem-tp3351352p3360663.html Sent from the S

autosuggest combination of data from documents and popular queries

2011-09-22 Thread abhayd
hi we already have autosuggest working using solr based on popular search terms. we use following approach.. http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from-popular-queries-using-edgengrams/ Now we want to use data indexed in solr also for autosuggest. with popular search terms

Re: DIH error when nested db datasource and file data source

2011-09-22 Thread abhayd
Any help? -- View this message in context: http://lucene.472066.n3.nabble.com/DIH-error-when-nested-db-datasource-and-file-data-source-tp3345664p3360637.html Sent from the Solr - User mailing list archive at Nabble.com.

Re: Snippets and Boundaryscanner in Highlighter

2011-09-22 Thread Koji Sekiguchi
(11/09/23 8:57), O. Klein wrote: The content_text field is filled with text from pdf's. So this is not the problem. Besides the regex fragmenter gives back multiple snippets like expected. This doesn't show that BoundaryScanner has the bug. Highlighter's fragmenter and FVH FragmentsBuilder are

Re: strategy for post-processing answer set

2011-09-22 Thread Fred Zimmerman
can you say a bit more about this? I see Velocity and will download it and start playing around but I am not quite sure I understand all the steps that you are suggesting. Fred On Thu, Sep 22, 2011 at 19:51, Markus Jelsma wrote: > Hi, > > Solr support the Velocity template engine and has veyr g

Re: Snippets and Boundaryscanner in Highlighter

2011-09-22 Thread O. Klein
The content_text field is filled with text from pdf's. So this is not the problem. Besides the regex fragmenter gives back multiple snippets like expected. Have you tested to see if a boundaryscanner of type LINE gives back multiple snippets with your content? -- View this message in context: ht

Re: strategy for post-processing answer set

2011-09-22 Thread Markus Jelsma
Hi, Solr support the Velocity template engine and has veyr good support. Ideal for generating properly formatted output from the search engine. There's a clustering example and it's easy to format documents indexed by Nutch. http://wiki.apache.org/solr/VelocityResponseWriter Cheers > > Hi, >

strategy for post-processing answer set

2011-09-22 Thread Fred Zimmerman
> > Hi, I would like to take the HTML documents that are the result of a Solr search and combine them into a single HTML document that combines the body text of each individual document. What is a good strategy for this? I am crawling with Nutch and Carrot2 for clustering. Fred

Re: Snippets and Boundaryscanner in Highlighter

2011-09-22 Thread Koji Sekiguchi
(11/09/23 7:59), O. Klein wrote: Thanx for you answer, but you are not using the Boundaryscanner No. Regardless of specifying BoundaryScanner or not, it is used implicitly because BaseFragmentsBuilder always use it (SimpleBoundaryScanner is the default). Try to index a long text and highlight

Re: Snippets and Boundaryscanner in Highlighter

2011-09-22 Thread O. Klein
Thanx for you answer, but you are not using the Boundaryscanner breakIterator LINE was the config I used and with 2 I expect to see 2 lines, but I only see one. -- View this message in context: http://lucene.472066.n3.nabble.com/Snippets-and-Boundaryscanner-in-Highlighter-tp3358898p3360398.ht

Re: SolrCloud state

2011-09-22 Thread Otis Gospodnetic
Hi, We just published a post on this topic the other day, have a look: http://blog.sematext.com/2011/09/14/solr-digest-spring-summer-2011-part-2-solr-cloud-and-near-real-time-search/ Otis Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch Lucene ecosystem search :: http://search-luc

Re: Snippets and Boundaryscanner in Highlighter

2011-09-22 Thread Koji Sekiguchi
(11/09/22 23:09), O. Klein wrote: Im testing the new Boundaryscanner in the highlighter, but I can't get it to show more then 1 snippet. 2 Bug or am I doing something wrong? I think your content_text is too short to get more than one snippets? Try the following with solr example (I'm using t

public constructor for KStemmer

2011-09-22 Thread Ofer Fort
He all, I was very happy to see that Kstemmer implementation was added to lucene. I was wondering why is the constructor not public? I have a case where i want to create an analyzer that uses the stemmer itself, and in order to construct a new instance, it has to be in the same package and be loade

ScriptTransformer question

2011-09-22 Thread Pulkit Singhal
Hello, I'm using DIH in the trunk version and I have placed breakpoints in the Solr code. I can see that the value for a row being fed into the ScriptTransformer instance is: {buybackPlans.buybackPlan.type=[PSP-PRP], buybackPlans.buybackPlan.name=[2-Year Buy Back Plan], buybackPlans.buybackPlan.sk

Re: Sort five random "Top Offers" to the top

2011-09-22 Thread Sujit Pal
Sorry hit send too soon. Personally, given the use case, I think I would still prefer the two query approach. It seems way too much work to do a handler (unless you want to learn how to do it) to support this. On Thu, 2011-09-22 at 12:31 -0700, Sujit Pal wrote: > I have a few blog posts on this...

Re: JdbcDataSource and threads

2011-09-22 Thread Rahul Warawdekar
Hi, Have you applied the patch that is provided with the Jira you mentioned ? https://issues.apache.org/jira/browse/SOLR-2233 Please apply the patch and check if you are getting the same exceptions. It has worked well for me till now. On Thu, Sep 22, 2011 at 3:17 PM, Vazquez, Maria (STM) < maria

Re: Sort five random "Top Offers" to the top

2011-09-22 Thread Sujit Pal
I have a few blog posts on this... http://sujitpal.blogspot.com/2011/04/custom-solr-search-components-2-dev.html http://sujitpal.blogspot.com/2011/04/more-fun-with-solr-component.html http://sujitpal.blogspot.com/2011/02/solr-custom-search-requesthandler.html but its quite simple, just look at

Re: Sort five random "Top Offers" to the top

2011-09-22 Thread Sujit Pal
Not the OP, but this is /much/ simpler, although at the expense of making 2 calls to solr. But the upside is that no customization is required. On Thu, 2011-09-22 at 09:43 +0100, Doug McKenzie wrote: > Could you not just do your normal search with and add a filter query on? > fq=topoffer:true >

Re: strange copied field problem

2011-09-22 Thread Chris Hostetter
: No probs. I would still hope someone would comment on you thread with : some expert opinions about making a copy of a copy :) https://wiki.apache.org/solr/SchemaXml#Copy_Fields "The copy is done at the stream source level and no copy feeds into another copy." If solr tried to

JdbcDataSource and threads

2011-09-22 Thread Vazquez, Maria (STM)
Hi! So as of 3.4 JdbcDataSource doesn't work with threads, correct? https://issues.apache.org/jira/browse/SOLR-2233 I'm using Microsoft SQL Server, my data-config.xml has a lot of very complex SQL queries and it takes a long time to index. I'm migrating from Lucene to Solr and the Lucene

Re: StopWords coming in Top 10 terms despite using StopFilterFactory

2011-09-22 Thread Shawn Heisey
On 9/22/2011 3:54 AM, Pranav Prakash wrote: Hi List, I included StopFilterFactory and I can see it taking action in the Analyzer Interface. However, when I go to Schema Analyzer, I see those stop words in the top 10 terms. Is this normal? You've got CommonGramsFilterFactory and

Re: Optimize fails with OutOfMemory Exception - sun.nio.ch.FileChannelImpl.map involved

2011-09-22 Thread Michael McCandless
Unfortunately I really don't know ;) Every time I set forth to figure things like this out I seem to learn some new way... Maybe someone else knows? Mike McCandless http://blog.mikemccandless.com On Thu, Sep 22, 2011 at 2:15 PM, Shawn Heisey wrote: > Michael, > > What is the best central plac

Re: Optimize fails with OutOfMemory Exception - sun.nio.ch.FileChannelImpl.map involved

2011-09-22 Thread Shawn Heisey
Michael, What is the best central place on an rpm-based distro (CentOS 6 in my case) to raise the vmem limit for specific user(s), assuming it's not already correct? I'm using /etc/security/limits.conf to raise the open file limit for the user that runs Solr: ncindex hardnofile

Re: Example setting TieredMergePolicy for Solr 3.3 or 3.4?

2011-09-22 Thread Shawn Heisey
On 9/21/2011 4:22 PM, Michael Ryan wrote: I think the problem is that the config needs to be inside of the config, rather than after it as your have. Thank you, that took care of it. With mergeFactor set to 8 and the TMP options set to 35, it merges after 35 segments. Shawn

Lot of ORs in a query and De Morgan Law

2011-09-22 Thread Emmanuel Espina
I have queries with a big big amount of OR terms. The AND terms are much more convenient to handle because they can be turned into several filter queries and cached. Thinking in innovative solutions I recalled the De Morgan Laws http://en.wikipedia.org/wiki/De_Morgan's_laws of Boolean Algebras, an

Autosuggest best practice / feedback

2011-09-22 Thread Doug McKenzie
Hi there, I'm relatively new to Solr and have been playing around with it for a few weeks now. I've got a system setup now that I'm currently quite happy with and is returning some decent results (although there's always room for improvement). Just hoping to get some feedback on the setup Cu

Re: How to get the fields that match the request?

2011-09-22 Thread Rahul Warawdekar
Hi, Before considering highlighting to address this requirement, you also need to consider the performance implications of highlighting for large text fields. On Thu, Sep 22, 2011 at 11:42 AM, Nicolas Martin wrote: > yes, highlights can help to do that, but if you wants to paginate your > result

mlt content stream help

2011-09-22 Thread dan whelan
I would like to use MLT and the content stream feature in solr like on this page: http://wiki.apache.org/solr/MoreLikeThisHandler How should the request handler / solrconfig be setup? I enabled streaming and I set a requestHandler up by copying the default request handler and I changed the na

Re: Optimize fails with OutOfMemory Exception - sun.nio.ch.FileChannelImpl.map involved

2011-09-22 Thread Michael McCandless
OK, excellent. Thanks for bringing closure, Mike McCandless http://blog.mikemccandless.com On Thu, Sep 22, 2011 at 9:00 AM, Ralf Matulat wrote: > Dear Mike, > thanks for your your reply. > Just a couple of minutes we found a solution or - to be honest - where we > went wrong. > Our failure was

Re: How to get the fields that match the request?

2011-09-22 Thread Nicolas Martin
yes, highlights can help to do that, but if you wants to paginate your results, you can't use hl. It'd be great to have a scoring average by fields... On 22/09/2011 17:37, Tanner Postert wrote: this would be useful to me as well. even when searching with q=test, I know it defaults to the d

Re: How to get the fields that match the request?

2011-09-22 Thread Tanner Postert
this would be useful to me as well. even when searching with q=test, I know it defaults to the default search field, but it would helpful to know what field(s) match the query term. On Thu, Sep 22, 2011 at 3:29 AM, Nicolas Martin wrote: > Hi everyBody, > > I need your help to get more informatio

Multi-word searches in multi-valued fields

2011-09-22 Thread Olson, Ron
Hi all- I'm not clear on how to allow a user to search a multi-valued field with multiple words and return only those documents where all the words are together in one value, and not spread over multiple values. If I do a literal search on the "company name" field for "smith trucking" (with th

RE: SpellCheck Print Multiple Collations

2011-09-22 Thread Kudzanai
spellcheck.collateExtendedResults = true seems to have sorted my problem. My other parameters are: spellcheck = true spellcheck.count = aNumResults spellcheck.q = SEARCH TEXT spellcheck.build= true spellcheck.collate= true spellcheck.maxCollations= 4 spellcheck.collateExtendedResults = true

RE: SpellCheck Print Multiple Collations

2011-09-22 Thread Dyer, James
Try adding "spellcheck.collateExtendedResults=true" to your query (without "maxCollationTries") to see if solrj correctly returns all 4 collations in that case. In any case, if solrj is returning the last collation 4 times, this is likely a bug. The likely reason why "spellcheck.maxCollationTr

RE: SpellCheck Print Multiple Collations

2011-09-22 Thread Kudzanai
I am using solrJ. Here is what my method looks like. List suggestedTermsList = new ArrayList(); if(aQueryResponse == null) { return suggestedTermsList; } try { SpellCheckResponse spellCheckResponse = aQueryResponse.getSpellCheckResponse(); if(spellCheckResponse ==

Snippets and Boundaryscanner in Highlighter

2011-09-22 Thread O. Klein
Im testing the new Boundaryscanner in the highlighter, but I can't get it to show more then 1 snippet. 2 Bug or am I doing something wrong? -- View this message in context: http://lucene.472066.n3.nabble.com/Snippets-and-Boundaryscanner-in-Highlighter-tp3358898p3358898.html Sent from the Solr -

RE: SpellCheck Print Multiple Collations

2011-09-22 Thread Dyer, James
If using SolrJ, use QueryResponse.getSpellCheckResponse().getCollatedResults() . This returns a List . On each Collation object, getCollationQueryString() will return the corrected queries. Note that unless you specify "spellcheck.maxCollationTries", the collations might not return anythin

Re: Solr Indexing - Null Values in date field

2011-09-22 Thread mechravi25
Hi, Thanks for the suggestions. This is the option I tried. I changed the data type in my source to date and then indexed the field once again. for the particular field , in my query in dataimport file, I gave the following condition IFNULL(startdate,NULL). The document was indexed sucessfully

Re: Optimize fails with OutOfMemory Exception - sun.nio.ch.FileChannelImpl.map involved

2011-09-22 Thread Ralf Matulat
Dear Mike, thanks for your your reply. Just a couple of minutes we found a solution or - to be honest - where we went wrong. Our failure was the use of ulimit. We missed, that ulimit sets the vmem for each shell seperatly. So we set 'ulimit -v unlimited' on a shell, thinking that we've done the

Re: Optimize fails with OutOfMemory Exception - sun.nio.ch.FileChannelImpl.map involved

2011-09-22 Thread Michael McCandless
Are you sure you are using a 64 bit JVM? Are you sure you really changed your vmem limit to unlimited? That should have resolved the OOME from mmap. Or: can you run "cat /proc/sys/vm/max_map_count"? This is a limit on the total number of maps in a single process, that Linux imposes. But the de

Re: ANTLR SOLR query/filter parser

2011-09-22 Thread Roman Chyla
Hi, I agree that people can register arbitrary qparsers, however the question might have been understoo differently - about the ANLR parser that can handle what solr qparser does (and that one is looking at _query_: and similar stuff -- or at local params, which is what can be copy&pasted into the

SpellCheck Print Multiple Collations

2011-09-22 Thread Kudzanai
Hi, This is probably a very basic question but how do I get the returned collations. My spell check request is http://localhost:8983/solr/autocomplete/select?spellcheck.q=ipood%20tough&spellcheck=true&spellcheck.collate=true&spellcheck.build=true&spellcheck.maxCollations=3&rows=3&spellcheck.cou

Search for empty string in 1.4.1 vs 3.4

2011-09-22 Thread Shanmugavel SRD
Hi, I am using SOLR 1.4.1. When I search for empty string in a string field, q=tag_facet:"", it return documents with values in tag_facet. When I use the same query q=tag_facet:"", in SOLR 3.4, it is returning only documents with "" string in tag_facet. SOLR 3.4 works as expected. I just wan

Re: SolrCloud state

2011-09-22 Thread Yury Kats
On 9/21/2011 1:45 PM, Miguel Coxo wrote: > What i would like to know is if a shard master fails will the replica be > "promoted" to a master. Or will it remain search only and only recover when > a new master is setup. Replica will not be promoted. Search would still work. > Also how is the docu

Re: Example setting TieredMergePolicy for Solr 3.3 or 3.4?

2011-09-22 Thread Michael McCandless
On Wed, Sep 21, 2011 at 10:10 PM, Michael Sokolov wrote: > I wonder if config-file validation would be helpful here :) I posted a patch > in SOLR-1758 once. Big +1. We should aim for as stringent config file checking as possible. Mike McCandless http://blog.mikemccandless.com

How to get the fields that match the request?

2011-09-22 Thread Nicolas Martin
Hi everyBody, I need your help to get more information in my solR query's response. i've got a simple input text which allows me to query several fields in the same query. So my query looks like this "q=email:martyn+OR+name:martynn+OR+commercial:martyn ..." Is it possible in the response to

Bad Request accessing solr on linux

2011-09-22 Thread Kissue Kissue
Hi, I am using solr 3.3 running on a linux box. For some reason when i make a request to solr on my windows box, i do not get bad request error but when i run it on my linux box, i get bad request. On the linux box, i have both my application and solr deployed on the same tomcat instance. Below i

Re: fieldCache problem OOM exception

2011-09-22 Thread erolagnab
Sorry to pull this up again, but I've faced a similar issue and would like to share the solution. In my situation, I uses SolrQueryRequest, SolrCore, SolrQueryResponse to explicitly perform the search. The gotcha from my code is that I didn't call SolrQueryRequest.close() hence the increasing memo

StopWords coming in Top 10 terms despite using StopFilterFactory

2011-09-22 Thread Pranav Prakash
Hi List, I included StopFilterFactory and I can see it taking action in the Analyzer Interface. However, when I go to Schema Analyzer, I see those stop words in the top 10 terms. Is this normal? *Pranav Prakash* "temet nosce" Twitter | Blog

Saxon + classpath issues

2011-09-22 Thread penela
Hi, I'm trying to make my XsltResponseWriter to use Saxon 9.1 as its default transformer (working with Solr 3.3 on Tomcat 7). After reading http://wiki.apache.org/solr/XsltResponseWriter I've added -Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl to Tomcat launch opt

Optimize fails with OutOfMemory Exception - sun.nio.ch.FileChannelImpl.map involved

2011-09-22 Thread Ralf Matulat
Good morning! Recently we slipped into an OOME by optimizing our index. It looks like it's regarding to the nio class and the memory-handling. I'll try to describe the environment, the error and what we did to solve the problem. Nevertheless, none of our approaches was successful. The environm

Re: Sort five random "Top Offers" to the top

2011-09-22 Thread MOuli
Hmm is it possible for me to write my own search component? I just downloaded the solr sources and need some informations how the search components work. Is there anything out there which can help me? -- View this message in context: http://lucene.472066.n3.nabble.com/Sort-five-random-Top-Offers

Re: Sort five random "Top Offers" to the top

2011-09-22 Thread MOuli
This was my first idea, but I want a solution which is handled by solr. When I didn't find a solution then I have to use something like that. -- View this message in context: http://lucene.472066.n3.nabble.com/Sort-five-random-Top-Offers-to-the-top-tp3355469p3358148.html Sent from the Solr -

Re: Slow autocomplete(terms)

2011-09-22 Thread roySolr
Hello Erick, Thanks for your answer but i have some problems with the ngramfilter. My conf look like this: I see this in the analysis: "manchester" ma an nc ch he es st t

Distributed Search question/feedback

2011-09-22 Thread dan sutton
Hi, Does SolrCloud use Distributed search as described http://wiki.apache.org/solr/DistributedSearch or is it different entirely? Does SolrCloud suffer from the same limitation as Distributed search (inefficient to use a high "start" parameter, and presumably high CPU highlighting all those docs

Re: Sort five random "Top Offers" to the top

2011-09-22 Thread Doug McKenzie
Could you not just do your normal search with and add a filter query on? fq=topoffer:true That would then return only results with top offer : true and then use whatever shuffling / randomising you like in your application. Alternately you could even add sorting on relevance to show the top 5