Re: FastVectorHighlighter truncated queries

2010-02-23 Thread Chris Lu
This should be a common wildcard query highlighting problem. You will need to query.rewrite() first, and pass the result to the highlighter. -- Chris Lu - Instant Scalable Full-Text Search On Any Database/Application site: http://www.dbsight.net demo: http://search.dbsig

FastVectorHighlighter truncated queries

2010-02-23 Thread halbtuerderschwarze
Hi, I just changed from Lucene 2.4.1 to Lucene 3.0.0 to use the FastVectorHighlighter, because I've large documents to search and hope for better highlighting performance. If I call the getBestFragments method I didn't get fragments for truncated queries (f.e. Ipod*), simple none truncated querie

Re: get the total number of hits of a query

2010-02-23 Thread jm
perfect, thanks guys On Tue, Feb 23, 2010 at 5:28 PM, Uwe Schindler wrote: > Hi, > > TopDocs tp = ms.search(lucquery, Integer.MAX_VALUE); > > ^^^This will crash and throw OutOfMemoryException > > The simpliest way ist: > TopDocs tp = ms.search(lucquery, 1); > And then the total count is in tp.tot

RE: get the total number of hits of a query

2010-02-23 Thread Uwe Schindler
Hi, TopDocs tp = ms.search(lucquery, Integer.MAX_VALUE); ^^^This will crash and throw OutOfMemoryException The simpliest way ist: TopDocs tp = ms.search(lucquery, 1); And then the total count is in tp.totalHits -- simple. The above query will still count all hits, but return only 1. Adjust acco

Re: get the total number of hits of a query

2010-02-23 Thread Cristian Vat
You shouldn't set the number of documents wanted to Integer.MAX_VALUE. The number of documents to the search method gives the size of the hit queue where the results are stored so you would end up consuming a lot of memory. Much easier to set it to something very small. Lucene must traverse all th

get the total number of hits of a query

2010-02-23 Thread jm
Hi, I need to find out how many hits a query will get, is this a valid way? (Lucene 3.0) Query lucquery = ...; IndexSearcher[] indexes = ... MultiSearcher ms = new MultiSearcher(indexes); TopDocs tp = ms.search(lucquery, Integer.MAX_VALUE); int hits = tp.to

RE: Strange Fuzzyquery results scoring when using a low minimal distance

2010-02-23 Thread stefcl
Thanks for the very detailed answer. Using fuzzylikethis solves the problem. Uwe Schindler wrote: > > The problem ist he following: > The docFreq of the term "lucéne" is 2, all other terms have 1 (because > StandardAnalyzer lowercases everything). What happens is, that terms with > lower docFr

Re: range of scores : queryNorm()

2010-02-23 Thread Smith G
Hello , > Could you back up a step and tell us what the upper-level > task you're trying to accomplish is? That is, why the partner > wants the number? I am not sure, I was assigned to do this task. It must be related to furthur tweaks of the result-set which is based on scores. > The normali