Re: standardTokenizer - how to terminate at End of Stream

2005-09-21 Thread Beady Geraghty
Thank you for your response. That was my original goal. On 9/21/05, Chris Hostetter <[EMAIL PROTECTED]> wrote: > > > : Since I used the StandAnalyzer when I originally created the index, > : I therefore use the StandardTokenizer to tokenize the input stream. > : Is there a better way to do what I

Suggestions for analysis

2005-09-21 Thread Jeff Rodenburg
I'm looking for some suggestions on an analyzer decision. I've got my own thoughts to this already, but would like some initial feedback on it first. The scenario: - An index of geographic information: cities, towns, states, neighborhoods, zipcodes, generic names, etc. Examples are "New Yor

Re: standardTokenizer - how to terminate at End of Stream

2005-09-21 Thread Chris Hostetter
: Since I used the StandAnalyzer when I originally created the index, : I therefore use the StandardTokenizer to tokenize the input stream. : Is there a better way to do what I try to do ? : From your comment below, it appears that I should just use next() instead if your goal is to recreate

Re: standardTokenizer - how to terminate at End of Stream

2005-09-21 Thread Beady Geraghty
Thank you for the response. I was trying to do something really simple - I want to extract the context for terms and phrases from files that satisfy some (many) queries. I *know* that file test.txt is a hit (because I queried the index, and it tells me that test.txt satisfies the query). Then, I o

Re: Example ....Lucene with Java Server Pages?

2005-09-21 Thread James Huang
That's exactly why I don't feel mine is the best solution. Many people have been asking about the right pattern for Lucene in webapps, and I'm paying close attention to those. To open an IndexSearcher is easy; the hard part for me is when to close it (to be ready for a potentially new index.) Perh

Re: Example ....Lucene with Java Server Pages?

2005-09-21 Thread Otis Gospodnetic
James, Well, if you want to do things right, then you should probably also get that IndexSearcher (or any other Java code) out of your JSP. :) You are right, IndexSearchers are meant to be reused. When the index changes, you need to open a new one, if you want to see the changes. Otis --- Jame

Re: Example ....Lucene with Java Server Pages?

2005-09-21 Thread James Huang
That demo (results.jsp) opens a IndexSearcher per each request, which I deem not really the right way of using Lucene in a web app. I used jspInit() to initiate a servlet-wide instance: <%! IndexSearcher searcher = null; public void jspInit() { searcher = ...; } %> Still not comp

Re: "Best-practice" in a web application AND live update of index used by Tomcat

2005-09-21 Thread Matthias Bräuer
Hello, Are you sure that both processes use the same directory to store the Lock files? Well, the variable FSDirectory.LOCK_DIR shows for both applications the same value (the temp directory in my home directory C:\Documents and Settings\Matthew\...). If both processes are on the same ma

Re: search performance enhancement

2005-09-21 Thread Paul Elschot
On Wednesday 21 September 2005 03:29, John Wang wrote: > Hi Paul and other gurus: > > In a related topic, seems lucene is scoring documents that would hit in a > "prohibited" boolean clause, e.g. NOT field:value. It doesn't seem to make > sense to score a document that is to be excluded from the

Re: Example ....Lucene with Java Server Pages?

2005-09-21 Thread Daniel Naber
On Wednesday 21 September 2005 19:21, Patricio Galeas wrote: > I search for a JSP examples of a simple search application with Lucene. lucene-1.4.3.tar.gz contains src/jsp. Also try "ant war-demo" in Lucene's source package. -- http://www.danielnaber.de ---

Re: standardTokenizer - how to terminate at End of Stream

2005-09-21 Thread Erik Hatcher
Could you elaborate on what you're trying to do, please? Using StandardTokenizer in this low-level fashion is practically unheard of, so I think knowing what you're attempting to do will help us help you :) Erik On Sep 21, 2005, at 12:17 PM, Beady Geraghty wrote: I see some definiti

Re: searching problem

2005-09-21 Thread Otis Gospodnetic
Hello, You could extract the file name extension at index time, and index it as a Field.Keyword. Then you can search for it with a simple TermQuery or : syntax using QueryParser. Otis P.S. Please don't cross-post - use [EMAIL PROTECTED] list --- haipeng du <[EMAIL PROTECTED]> wrote: > how cou

Example ....Lucene with Java Server Pages?

2005-09-21 Thread Patricio Galeas
Hello, I search for a JSP examples of a simple search application with Lucene. I try to execute the lucene search as a .jsp file but it doesn't work. Do you know where can I found information about this topic Thank You - To uns

Re: standardTokenizer - how to terminate at End of Stream

2005-09-21 Thread Beady Geraghty
I see some definitions in StandardTokenizerConstants.java Perhaps these are the values for t.kind. Perhaps, I was confused between between the usage of getNextToken() and next() in the standard analyzer. When should one use getNextToken() instead of next() I am just starting to use Lucene, so ple

RE: How to sort results

2005-09-21 Thread Mordo, Aviran (EXP N-NANNATEK)
http://lucene.apache.org/java/docs/api/org/apache/lucene/search/Sort.htm l -Original Message- From: Wi [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 21, 2005 11:20 AM To: java-user@lucene.apache.org Subject: How to sort results I want to sort results by some field. Of cause i ca

Re: How to sort results

2005-09-21 Thread Ian Lea
http://lucene.apache.org/java/docs/api/org/apache/lucene/search/Searcher.html#search(org.apache.lucene.search.Query,%20org.apache.lucene.search.Sort) http://www.lucenebook.com/search?query=sort -- Ian. [EMAIL PROTECTED] On 21/09/05, Wi <[EMAIL PROTECTED]> wrote: > I want to sort results by some

How to sort results

2005-09-21 Thread Wi
I want to sort results by some field. Of cause i can fetch all results and then sort them in memory but this is bad way... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

standardTokenizer - how to terminate at End of Stream

2005-09-21 Thread Beady Geraghty
Could someone tell me how to use the StandardTokenizer properly ? I thought that if the tokenizer.getNextToken() returns null, then it is the end of stream. I have a loop that tries to get the next token until it is null. But the loop doesn't terminate. I tried to termintae the loop by t.kind == 0

Re: Boost value is lost

2005-09-21 Thread Yonik Seeley
You don't get the boost back directly... it's folded into the "norm" for the field and does affect the score when you search against the index. -Yonik On 9/21/05, Steve Gaunt <[EMAIL PROTECTED]> wrote: > > Hi all, > > I was hoping someone could shed some light on this? > When I set a boost for a

Boost value is lost

2005-09-21 Thread Steve Gaunt
Hi all, I was hoping someone could shed some light on this? When I set a boost for a particular field during indexing, for example field.setBoost(1.5f); document.add(field); Then do a indexwriter.optimize(); But when I do a search and get the document back, the boost value for that field has b

IndexSearcher architecture and memory usage

2005-09-21 Thread Peter Kim
Hi all, I've been searching through the list archives for this info but haven't found exactly what I'm looking for... Hoping that someone might have the answer to this off the top of their head. Is the amount of memory taken up by an IndexSearcher object proportional to the size of the index? I've

Re: Stale NFS file handle Exception

2005-09-21 Thread Oren Shir
Hi, There is an issue with file locking and NFS, which requirs setting some system property for lock files directory that must be local. Might be relevant. Oren On 9/21/05, John Wang <[EMAIL PROTECTED]> wrote: > > How do you "update" the index? > > -John > > On 9/12/05, Harini Raghavan <[EMAIL P

RE: "Best-practice" in a web application AND live update of index used by Tomcat

2005-09-21 Thread Vanlerberghe, Luc
Are you sure that both processes use the same directory to store the Lock files? If both processes are on the same machine, they will both default to the same local directory and you won't see the problem. If they are on separate machines, you should set the lock directory to some shared locati