Re: I need the internal lucene's document id from Hits

2007-04-05 Thread Ronnie Kolehmainen
It's in the FAQ: http://wiki.apache.org/lucene-java/LuceneFAQ#head-e1de2630fe33fb6eb6733747a5bf870f600e1b4c Mohammad Norouzi wrote: but the question is, if I add, say, a document to my index, is lucene going to re arrange the internal IDs? can't I trust them? Would you tell me in exactly which

Re: SELECT * FROM Index-file

2007-03-05 Thread Ronnie Kolehmainen
Or MatchAllDocsQuery. /Ronnie Erick Erickson wrote: Why not just call IndexReader.document(idx) where idx ranges from 0 to IndexReader.maxDoc()? I believe if your index has some deleted documents you'll have to handle null returns though Sorry to lose you to the dark side ... Best Erick

Re: Empty search

2007-02-08 Thread Ronnie Kolehmainen
If you are refering to QueryParser, and if you mean that you want Lucene to *find everything* when you actually say *search for nothing*, you could easily extend current Queryparser to suit your needs: public class MyQueryParser extends QueryParser { public MyQueryParser(String f, Analy

Re: Problems with Queries which contain '_' and wildcards

2006-12-13 Thread Ronnie Kolehmainen
I recognize that error message ;) You're using AnalyzingQueryParser - yes? These are imo the two most obvious options: 1. Revert to standard QueryParser - it won't analyze prefix- and

Re: QueryParser syntax French Operator

2006-10-03 Thread Ronnie Kolehmainen
Wouldn't the easiest fix be to just alter the users query string before passing it to queryparser (moving the semantics of your search app outside of lucene)? Something like: str.replaceAll(" ET ", " AND ").replaceAll(" OU ", " OR ").replaceAll(" SAUF ", " NOT ") Citerar Mark Miller <[EMAIL PROT

Re: ParallelMultiSearcher

2006-09-21 Thread Ronnie Kolehmainen
Dont ask to ask, just ask! ;) Citerar Yura Smolsky <[EMAIL PROTECTED]>: > Hello, java-user. > > Does anyone here uses ParallelMultiSearcher for searching big arrays > of data? I have some questions about PrefixQuery search.. > > Thanks in advance. > > -- > Yura Smolsky, > http://altervisionm

Re: IOException when calling hits.doc(int)

2006-09-13 Thread Ronnie Kolehmainen
;) /Ronnie Huinan wrote: Thanks, Ronnie. But why it works in some cases (when there is a small number of documents inside the index) ? On 9/13/06, Ronnie Kolehmainen <[EMAIL PROTECTED]> wrote: Do not close the searcher until you are done with the Hits object. See the javado

Re: IOException when calling hits.doc(int)

2006-09-13 Thread Ronnie Kolehmainen
Do not close the searcher until you are done with the Hits object. See the javadocs for Searchable.close() http://lucene.apache.org/java/docs/api/org/apache/lucene/search/Searchable.html#close() /Ronnie Huinan wrote: Hi, I'm having a weird problem: I created an index using IndexWriter. Then

Re: QueryParser returns all documents

2006-09-05 Thread Ronnie Kolehmainen
You could define your own query syntax (for example an empty string) for a query matching all docs, examine the query string before passing it to QueryParser, and instead create a MatchAllDocsQuery when a you have a match. http://lucene.apache.org/java/docs/api/org/apache/lucene/search/MatchAll

Re: Installing a custom tokenizer

2006-08-29 Thread Ronnie Kolehmainen
Have a look at PerFieldAnalyzerWrapper: http://lucene.apache.org/java/docs/api/org/apache/lucene/analysis/PerFieldAnalyzerWrapper.html Citerar Bill Taylor <[EMAIL PROTECTED]>: > is there some way to get the standard Field constructor to use, say, > the Whitespace Tokenizer as opposed to the s

Re: Document Get question

2006-08-24 Thread Ronnie Kolehmainen
If you want to get "file.txt" out of "/documents/file.txt" simply cut of everything before the last "/": String path = doc.get("path"); String name = path != null ? path.substring(path.lastIndexOf("/") + 1) : path; Otherwise, if you want to store only the name in the index, you will have to d

Re: Highlighter

2006-08-11 Thread Ronnie Kolehmainen
There is an issue in JIRA, see http://issues.apache.org/jira/browse/LUCENE-645 So I guess you're not the only one. /Ronnie Citerar Mark Miller <[EMAIL PROTECTED]>: > Am I the only one that gets back a string missing the final character > when using the highlighter and the null fragmenter? I al

Re: HELP: how to highlight the search key word in lucene's search results?

2006-08-11 Thread Ronnie Kolehmainen
This is in the FAQ: http://wiki.apache.org/jakarta-lucene/LuceneFAQ#head-75566820ee94a425c7e2950ac61d24e405fbd914 Citerar kevin <[EMAIL PROTECTED]>: > Hi, > how to highlight the search key word in lucene's search results? pls > give advise,thanks! > > --

Re: Lucene/Tomcat Memory Leak Issue

2006-08-11 Thread Ronnie Kolehmainen
How do you index your documents? Are you releasing old resources? Can you use a profiler to see referenced objects? I've experienced the same problem when indexing xml files which were parsed with xalan, and the memory leak in that case was in xalan. Switching to saxon solved the problems for us.

Re: :intersection of two hits objects:

2006-01-18 Thread Ronnie Kolehmainen
adanki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- ____ Ronnie Kolehmainen Systems Developer Electronic Publishing Centre Uppsala University Library

Re: NullPointerException in ParallelMultiSearcher

2005-12-21 Thread Ronnie Kolehmainen
e-mail: [EMAIL PROTECTED] -- ____________ Ronnie Kolehmainen Systems Developer Electronic Publishing Centre Uppsala University Library +46 (0)18 471 5847

Re: [ANN] Lucene "Did You Mean" article on java.net

2005-08-18 Thread Ronnie Kolehmainen
Nice article! And for those interested in the different "did you mean" techniques can also look at my simple implementation using the first approach mentioned in the article, minimum edit distance, along with document frequency. This implementation can easily be applied over an existing index. ht