displaying 'pages' of search results...

2004-09-22 Thread Karthik N S
Hi Can u share the searcher.search(query, hitCollector); [light weight paging api ] Code on the form ,may be somebody like me need's it. ; ) Karthik -Original Message- From: Praveen Peddi [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 1:24 AM To:

Re: Combining Lucene and database functionality

2004-09-22 Thread Morus Walter
Marco Schmidt writes: I'm trying to find out whether Lucene is an option for a project of mine. I have texts which also have a date and a list of numbers associated with each of them. These numbers are ID values which connect the article to certain categories. So a particular article X

Implement custom score

2004-09-22 Thread [EMAIL PROTECTED]
Hi, I know this is probably a common question and I've found a couple of posts about it in the archive but none with a complete answer. If there is one please point me to it! The question is that I want to discard the default scoring and implement my own. I want all the the hits to be sorted

Re: Implement custom score

2004-09-22 Thread Otis Gospodnetic
You need your own Similarity implementation and you need to set it as shown in this javadoc: http://jakarta.apache.org/lucene/docs/api/org/apache/lucene/search/Similarity.html Otis --- [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I know this is probably a common question and I've found a

Re: Implement custom score

2004-09-22 Thread [EMAIL PROTECTED]
Yes thanks, I implemented my own Similarity class that returns 1.0f from lengthNorm() and idf() then I use setBoost when writing the document. However I get some small round errors. When I boost with 0.7 that document gets the score 0.625. I've found that this has to do with the encode/decode norm

Re: Implement custom score

2004-09-22 Thread Erik Hatcher
Actually what William should use is the new Sort facility to order results by a field. Doing this with a Similarity would be much trickier. Look at the IndexSearcher.sort() methods which take a Sort and follow the Javadocs from there. Let us know if you have any questions on sorting.

Re: Implement custom score

2004-09-22 Thread [EMAIL PROTECTED]
Thanks for the reply, I've looked in to the search method that takes a Sort object as argument. As I understand it the sorting is only done on the best matches (100 by default)? I don't want the default score to have any impact at all. I want to sort all hits on popularity not just the best

Re: Implement custom score

2004-09-22 Thread Erik Hatcher
Sorting is done however you specify, by field, with secondary fields specified, by document id, by score/relevance, or even by a custom implementation to sort by something else (in Lucene in Action we provide an implementation that sorts by two-dimensional distance from a given location,

RE: WildCardQuery

2004-09-22 Thread Raju, Robinson (Cognizant)
Hi , I think it doesn't have anything to do with number of characters with a wildcard. Because 'z*' works and 'a*' does not. Does lucene have a limitation on the number of hits fetched ? The error that I get is org.apache.lucene.search.BooleanQuery$TooManyClauses at

about snowball

2004-09-22 Thread Wermus Fernando
I have test my app with snowball for english. But I'm doing something wrong because I can't get any result from hit. If I index lazy with English snowball when I see the word in Luke it shows lazy (I've read that Luke show the file as is). When I do the search for the word laziness the snowball

Fwd: Questions related to closing the searcher

2004-09-22 Thread Edwin Tang
Hello, In my testing, it seems like if the searcher (in my case ParallelMultiSearcher) is not closed, the searcher will not pick up any new data that has been added to the index since it was opened. I'm wondering if this is a correct statement. Assuming the above is true, I went about closing

Re: displaying 'pages' of search results...

2004-09-22 Thread Praveen Peddi
Sure I can share parts of the code. LuceneSearchResults class extends HitCollector and overrides collect() method and takes care of paging stuff. The class roughly looks as follows. I didn't add un necessary methods for simplicity. collect method just reads the doc ids and score, but not the

problem with get/setBoost of document fields

2004-09-22 Thread Bastian Grimm [Eastbeam GmbH]
hi all, i have a strange problem with the get and setBoost functions (lucene-1.4.1). i am trying the following code: [...] Document d1 = new Document(); Field f1 = Field.Text(field, word); f1.setBoost(2.0f); d1.add(f1); d1.setBoost(3.0f); writer.addDocument(d1); [...] so if i'am right, this must

Re: about snowball

2004-09-22 Thread John Moylan
You need to search useing a snowball analayzer and also index using the same analyzer. John Wermus Fernando wrote: I have test my app with snowball for english. But I'm doing something wrong because I can't get any result from hit. If I index lazy with English snowball when I see the word in

Re: problem with get/setBoost of document fields

2004-09-22 Thread Daniel Naber
On Wednesday 22 September 2004 18:44, Bastian Grimm [Eastbeam GmbH] wrote: if i set the d1 and f1 boost to 1.0f (default) the score returned by the HitCollector is 0.3xxx - shouldn't it be exactly 1.0 ? See the documentation for getBoost: Note: this value is not stored directly with the

TopTerms on query results

2004-09-22 Thread wallen
Can anyone help me with code to get the topterms of a given field for a query resultset? Here is code modified from Luke to get the topterms for a field: public TermInfo[] mostCommonTerms( String fieldName, int numberOfTerms ) { //make sure min will get a positive number

Re: PHP and Lucene

2004-09-22 Thread Paul Waite
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Erik Hatcher wrote: On Sep 15, 2004, at 1:45 PM, Karthik N S wrote: 1) Is a there a PHP version of Lucene Implemantation avaliable , If so Where? Using the Java version of Lucene from PHP is my recommendation. There is not a PHP version.

Re: Highlighting PDF file after the search

2004-09-22 Thread Balasubramanian . Vijay
David, I tried your technique, i am directly streaminf the pdf file in to Lucene highlighter as below and i get a NPE in highlighter.getBestFragments(tokenStream, docAsString, 3, ...); API doc is not very clear here, i fed the contents of query string (instead of docAsString)to this method and

Transcations in Lucene + Berkeley DB

2004-09-22 Thread Christian Rodriguez
Hi Luceners! I am trying to use transcations in the Berkeley DB + Lucene package from the sandbox. Has anyone done this succesfully? I dont see any transactions being commited or aborted in the code, so I wonder if transactions actually work (shouldnt the main transaction that is used for opening

demo HTML parser question

2004-09-22 Thread Fred Toth
Hi, I've been working with the HTML parser demo that comes with Lucene and I'm trying to understand why it's multi-threaded, and, more importantly, how to exit gracefully on errors. I've discovered if I throw an exception in the front-end static code (main(), etc.), the JVM hangs instead of

RE: WildCardQuery

2004-09-22 Thread Raju, Robinson (Cognizant)
Thanks a lot Paul , for solving the problem. I added booleanQuery.setMaxClauseCount(1) and there was no prob after that. Regards, Robin -Original Message- From: Raju, Robinson (Cognizant) Sent: Wednesday, September 22, 2004 8:01 PM To: 'Lucene Users List' Subject: RE: WildCardQuery