RE: How to rename fields in an index

2007-08-22 Thread Jun.Chen
Dear Andrzej Bialecki Can we change the field name in *.fnm directly by hand? -Original Message- From: Andrzej Bialecki [mailto:[EMAIL PROTECTED] Sent: 2007年8月22日 8:04 下午好,Daniel To: java-user@lucene.apache.org Subject: Re: How to rename fields in an index Antoine Baudoux wrote: > No, i

Re: How to rename fields in an index

2007-08-22 Thread mark harwood
Might another option be to wrap IndexReader? Something similar to this in principle: https://issues.apache.org/jira/browse/LUCENE-835 - Original Message From: Antoine Baudoux <[EMAIL PROTECTED]> To: java-user@lucene.apache.org Sent: Wednesday, 22 August, 2007 4:44:35 PM Subject: Re:

Re: How to rename fields in an index

2007-08-22 Thread Antoine Baudoux
I really don't like the dirty solution ;-) I could come up with a patch if many are interested in this. What do you like be the best : patching QueryParser ,or a new QueryParser subclass ? -- Antoine Baudoux Development Manager [EMAIL PROTECTED] Tél.: +32 2 333 58 44 GSM: +32 499 534 538 Fax

Re: How to rename fields in an index

2007-08-22 Thread Erik Hatcher
On Aug 22, 2007, at 11:02 AM, Antoine Baudoux wrote: In fact I need this change just for the Query parser class, to be able to make queries such as kw:blah. Now my field is called "org.mycompany.mediafield.keyword". Not very easy to make queries with this field name! It would be cool if

Re: How to rename fields in an index

2007-08-22 Thread Antoine Baudoux
Re-indexing would take a lot of time. In fact I need this change just for the Query parser class, to be able to make queries such as kw:blah. Now my field is called "org.mycompany.mediafield.keyword". Not very easy to make queries with this field name! It would be cool if QueryParser h

RE: Indexing

2007-08-22 Thread Ard Schrijvers
10 updates per minute is not very much? Why not invalidate your used reader after every commit, and reopen it? If your index is really big, you might want to reopen it fewer times, but this is very simple to do (reopen every x updated times) Also the RAM and FS solution Erick suggests is possib

Re: How to rename fields in an index

2007-08-22 Thread Andrzej Bialecki
Erick Erickson wrote: Unless it's really, really, really prohibitive or impossible, I'd recommend regenerating your index. Messing around in the low-level file formats is just asking for trouble. Not to mention that you'll probably have to remanufcture your index sometime, somewhere and hack all

Re: Indexing

2007-08-22 Thread Erick Erickson
There's nothing in the "complex" solution that has anything to do with recreating the index. The RAMDir is really the delta between the FSDIr and the updates. Keeping it all in RAM really consists of reading the FSDIR into RAM and updating both. Erick On 8/22/07, Jonathan Ariel <[EMAIL PROTE

Re: Indexing

2007-08-22 Thread Jonathan Ariel
I'm not reindexing the entire index. I'm just commiting the updated. But I'm not sure how it would affect performance to commit in real time. I think right now I have like 10 updated per minute. On 8/22/07, Erick Erickson <[EMAIL PROTECTED]> wrote: > > There are several approaches. First, is your

Re: Indexing

2007-08-22 Thread Erick Erickson
There are several approaches. First, is your index small enough to fit in RAM? You might consider just putting it all in RAM and searching that. A more complex solution would be to keep the increments in a separate RAMDir AND your FSDir, search both and keep things coordinated. Something like ope

Re: How to rename fields in an index

2007-08-22 Thread Erick Erickson
Unless it's really, really, really prohibitive or impossible, I'd recommend regenerating your index. Messing around in the low-level file formats is just asking for trouble. Not to mention that you'll probably have to remanufcture your index sometime, somewhere and hack all over again or *hope* tha

Re: Indexing

2007-08-22 Thread Askar Zaidi
Thats exactly what I do. The moment something is added to the database , I add it to the lucene index of the user. Upon new account creation, open a new lucene index for this new user. Whenever something is uploaded, just add it to the index. - Askar On 8/22/07, Ard Schrijvers <[EMAIL PROTECTED]>

RE: search returns always the first indexed name

2007-08-22 Thread Ard Schrijvers
Use getValues("name"), see http://lucene.zones.apache.org:8080/hudson/job/Lucene-Nightly/javadoc/org/apache/lucene/document/Document.html#getValues(java.lang.String) Regards Ard Hi I am using lucene to index xml. I have already managed to index the elements. I am indexing the element of xml w

RE: Indexing

2007-08-22 Thread Ard Schrijvers
Do you reindex everything every 5 minutes from scratch? Can't you keep track of what changes, and only add/remove the correct parts to the index? Ard I'm new to this list. So first of all Hello to everyone! So right now I have a little issue I would like to discuss with you. Suppose that your a

search returns always the first indexed name

2007-08-22 Thread Amit
Hi I am using lucene to index xml. I have already managed to index the elements. I am indexing the element of xml which have multiple elements in a document. The code is as follows Directory directory = new RAMDirectory(); Analyzer analyzer = new StandardAnalyzer(); Rules.mainnn

Indexing

2007-08-22 Thread Jonathan Ariel
Hi, I'm new to this list. So first of all Hello to everyone! So right now I have a little issue I would like to discuss with you. Suppose that your are in a really big application where the data in your database is updated really fast. I reindex lucene every 5 min but since my application lists ev

Re: lucene suggest

2007-08-22 Thread Karl Wettin
21 aug 2007 kl. 13.10 skrev Jens Grivolla: On 8/21/07, Heba Farouk <[EMAIL PROTECTED]> wrote: the documents are not duplicated, i mean the hits (assume that 2 documents have the same subject but with different authors, so if i'm searching the subject, the returned hits will have duplicates

Re: Lockless read-only deletions in IndexReader?

2007-08-22 Thread Karl Wettin
Thanks Mike, I'll dig around a bit and report back what I did. 20 aug 2007 kl. 14.33 skrev Michael McCandless: "karl wettin" <[EMAIL PROTECTED]> wrote: I want to set documents in my IndexReader as deleted, but I will never commit these deletions. Sort of a filter on a reader rather than on

Re: How to rename fields in an index

2007-08-22 Thread Antoine Baudoux
Thanks! -- Antoine Baudoux Development Manager [EMAIL PROTECTED] Tél.: +32 2 333 58 44 GSM: +32 499 534 538 Fax.: +32 2 648 16 53 On 22 Aug 2007, at 14:03, Andrzej Bialecki wrote: Antoine Baudoux wrote: No, i just want to change the field labels. For example, i have a "Keyword" field that i w

RE: reg-ex based stop word removal

2007-08-22 Thread Ard Schrijvers
> "implement a TokenFilter http://lucene.zones.apache.org:8080/hudson/job/Lucene-Nightly/javadoc/org/apache/lucene/analysis/TokenFilter.html"; You might though want to check the performance implications :-) - To unsubscribe

Re: How to rename fields in an index

2007-08-22 Thread Andrzej Bialecki
Antoine Baudoux wrote: No, i just want to change the field labels. For example, i have a "Keyword" field that i want to rename into "kw". (note: this is a low-level hack, you can damage your index beyond repair). Take a look at FieldInfos class, and how it creates the *.fnm file for each seg

Re: reg-ex based stop word removal

2007-08-22 Thread Mathieu Lecarme
sandeep chawla a écrit : > Hi , > > I am working on a search application . This application requires me to > implement a stop filter > using a stop word list. I have implemented a stop filter using lucene's API. > > I want to take my application one step further. > > I want to remove all the words

reg-ex based stop word removal

2007-08-22 Thread sandeep chawla
Hi , I am working on a search application . This application requires me to implement a stop filter using a stop word list. I have implemented a stop filter using lucene's API. I want to take my application one step further. I want to remove all the words which match a particular regular expres

Re: Query.toString() and QueryParser.parse()

2007-08-22 Thread loesh
Erik Hatcher wrote: On Aug 22, 2007, at 6:34 AM, loesh wrote: Query parsed = qp.parse(queryString); String parsedString = parsed.toString(); boolean equals = parsedString().equals(queryString); Maybe not the clearest of questions. but should "equals" in the above example allways be true for

Re: Query.toString() and QueryParser.parse()

2007-08-22 Thread Erik Hatcher
On Aug 22, 2007, at 6:34 AM, loesh wrote: Query parsed = qp.parse(queryString); String parsedString = parsed.toString(); boolean equals = parsedString().equals(queryString); Maybe not the clearest of questions. but should "equals" in the above example allways be true for any Query? No, tha

Query.toString() and QueryParser.parse()

2007-08-22 Thread loesh
Hi, I am wondering if QueryParser.parse(...) is supposed to be able to recreate any given query using something like: Query query = //creating query somehow. Queryparser qp = //creatign a query parser String queryString = query.toString(); Query parsed = qp.parse(queryString); String parsedStr

Re: How to rename fields in an index

2007-08-22 Thread Antoine Baudoux
No, i just want to change the field labels. For example, i have a "Keyword" field that i want to rename into "kw". -- Antoine Baudoux Development Manager [EMAIL PROTECTED] Tél.: +32 2 333 58 44 GSM: +32 499 534 538 Fax.: +32 2 648 16 53 On 22 Aug 2007, at 10:27, <[EMAIL PROTECTED]> <[EMAIL PR

RE: How to rename fields in an index

2007-08-22 Thread Jun.Chen
Document.removefield() Then, add() ? Is this your mean? -Original Message- From: Antoine Baudoux [mailto:[EMAIL PROTECTED] Sent: 2007年8月22日 3:55 下午好,Daniel To: java-user@lucene.apache.org Subject: How to rename fields in an index Is it possible to rename fields in an existing index with

Re: NPE in IndexReader

2007-08-22 Thread Michael Busch
Chris Hostetter wrote: > > This is one of the reasons why i was suggesting in a java-dev thread that > *all* of the refrences to SegmentInfos be refactored out of IndexReader > and into the subclasses -- any attempt to access the SegmentInfos in a OK, I'm convinced that we should refactor segment

How to rename fields in an index

2007-08-22 Thread Antoine Baudoux
Is it possible to rename fields in an existing index without having to re-index all documents? thx -- Antoine Baudoux Development Manager [EMAIL PROTECTED] Tél.: +32 2 333 58 44 GSM: +32 499 534 538 Fax.: +32 2 648 16 53